Ubuntu / Linux news and application reviews.

jarlath @ Ubuntuforums has created a nice Dropbox script which closes Dropbox after the synchronization finishes.

Why would you want Dropbox to close when it finishes syncing:
  • de-clutter the notification area
  • the Dropbox icon doesn't match the new monochrome icons in Ubuntu anyway, and the Dropbox notification area cannot be changed (in the stable version because the experimental version has this. New post coming in a few minutes).
  • some people only use Dropbox for syncing once when they power up the computer, yet Dropbox continues to run which is useless. However if you want Dropbox to continue the synchronization later on, you can add a crontab for this script which will run Dropbox at a given interval, check if there's any syncing needed to be done and exit when finished


If you want to use the script here's what you need to do.



1. Download the script to your home folder (of course, you can copy it somewhere else if you want):
cd && wget http://webupd8.googlecode.com/files/.check-dropbox.sh

Note: the filename begins with a "." which means the file will be hidden so it doesn't clutter your home folder.

The script can also be downloaded from the Ubuntuforums.



2. Add the script to your statup applications and / or make it run on a given interval using crontab


startup applications ubuntu

To add the script to your startup applications, go to System > Preferences > Startup Applications, click "Add" and add the script (remember, it's called .check-dropbox.sh). If you saved it to your home folder, browse for it, click Ctrl + H to show hidden files and select .check-dropbox.sh, then give it a name and that's it.



crontab

To make the script run at a given interval, open a terminal and type:
crontab -e

Then enter a line like this:
*/45 * * * * /home/andrei/.check-dropbox.sh


Where:
  • */45 means the script will run every 45 minutes
  • /home/andrei/.check-dropbox.sh is the exact path to the script (so replace it with the path where you've saved it. If you've used the commad to save it into your home folder, it should be in /home/YOUR_USERNAME/.check-dropbox.sh)

After you're done editing crontab, press Ctrl + O, ENTER, Ctrl + X (write out the changes and then exit)

You can of course customize the interval the script runs. For help with Cron, see: