How can I delay dropbox from starting, but not disable it?

When I log into my user account on Ubuntu 10.10, there is a unsatisfying delay before my system becomes usable. Even launching a terminal, I have to wait a few seconds before the bash prompt appears. During this start-up period, the top process seems to be dropbox. I'm not sure what it's doing exactly (functionality is still fine as far as I can see), but I do know it really doesn't need to be doing it while I'm waiting for desktop to appear. (This is the standard Ubuntu with Gnome desktop, by the way.)

What I would like to do is to be able to have a static or even dependency-based delay for dropbox to start. It would be nice if it waited for, e.g., 10 minutes, or for my browser tabs to load and a typing pause. Then it could churn away on file status or cache-chewing, and I would be happy.

Is there a way to do this? Thanks!


First, disable Dropbox from starting on login.
Open up the DropBox preferences and uncheck Start Dropbox on system startup:

enter image description here

Now we will manually add Dropbox to the list of applications that run on login.
Open up System ➜ Preferences ➜ Startup Applications and click on Add to add a new entry.

Use Dropbox for the name and bash -c "sleep 10m && dropbox start -i" for the command, and then click Add to save it.

enter image description here

That's it, now Dropbox won't start until 10 minutes after you have logged in.


I found myself having the same problem recently and the way I fixed it is a mixture of the two answers, the reason being that Dropbox would rewrite the launcher dropbox.desktop entry in ~/.config/autostart/ whether I had it ticked to start on startup or not. So here are the steps you can take if you find yourself in a similar situation:

  • Untick the box to start on system startup (see first pick on Onalemon's answer)

  • Create a file that will be your custom application launcher in ~/.config/autostart/. You can use

    gedit ~/.config/autostart/theNameOfYourCustomLauncher.desktop.

Whatever you want to call it, just don't call it dropbox.desktop

  • paste in the following code using your own settings for the Name and the X-GNOME-Autostart-Delay

    [Desktop Entry]
    Name=NameOfYourCustomLauncher
    GenericName=File Synchronizer
    Comment=Sync your files across computers and to the web
    Exec=dropbox start
    X-GNOME-Autostart-Delay=15 
    Terminal=false
    Type=Application
    Icon=dropbox
    Categories=Network;FileTransfer;
    StartupNotify=false
    

All that is left is for you to create a new startup launcher: I'm using the Gnome Shell, so I can just go to Applications ➜ System Tools ➜ Startup Applications or run gnome-session-properties on terminal and fill in the text boxes:

Name: NameOfYourCustomLauncher
Command: dropbox start -i
Comment: YourComment

And that's it! After a restart it worked just fine.