Take the 2-minute tour ×
Ask Ubuntu is a question and answer site for Ubuntu users and developers. It's 100% free, no registration required.

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!

share|improve this question

3 Answers 3

up vote 25 down vote accepted

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.

share|improve this answer
1  
Great info, DoR. Thanks! –  Ramón Jan 21 '11 at 7:25
1  
It doesn't work for me. For some reason, the command reverts to the default after a reboot. –  user9671 Jan 26 '11 at 21:57
1  
@Alex, see my updated answer. It turns out dropbox overwrites the .desktop autostart file every time it is run. –  Alvin Row Jan 26 '11 at 22:05
    
Thank you VERY much DoR!!! Exactly the answer i was looking for. –  user11068 Feb 18 '11 at 15:39
    
Very useful, but remove the - i option in order to avoid dropbox reinstalling itself at startup –  Omegafil Aug 8 '12 at 9:36

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.

share|improve this answer

Delaying autostart with inbuilt delay option

This one works without the need for a script or sleep. Open your dropbox autostart entry in a text editor:

gedit ~/.config/autostart/dropbox.desktop

Append the following line to the file:

X-GNOME-Autostart-Delay=foo

where foo is the time in seconds you want to delay the application launch by, for instance

X-GNOME-Autostart-Delay=60

would delay the application start by one minute.

Save the file, relog and you should see the effects.

share|improve this answer
1  
This works fine once, but unfortunately Dropbox overwrites the .desktop file at startup. Making this file readonly with chmod a-w dropbox.desktop seems to solve this issue. –  Bas Swinckels Nov 4 at 11:17

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.