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

11,516

Solution 1

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.

Solution 2

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.

Solution 3

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:
11,516

Related videos on Youtube

belacqua
Author by

belacqua

Updated on September 17, 2022

Comments

  • belacqua
    belacqua over 1 year

    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!

  • Admin
    Admin about 13 years
    It doesn't work for me. For some reason, the command reverts to the default after a reboot.
  • Isaiah
    Isaiah about 13 years
    @Alex, see my updated answer. It turns out dropbox overwrites the .desktop autostart file every time it is run.
  • Admin
    Admin about 13 years
    Thank you VERY much DoR!!! Exactly the answer i was looking for.
  • Omegafil
    Omegafil over 11 years
    Very useful, but remove the - i option in order to avoid dropbox reinstalling itself at startup
  • rafee
    rafee almost 10 years
    Worked for transmission, but dropbox just didn't start. Bit unusual.
  • Bas Swinckels
    Bas Swinckels over 9 years
    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.