15

How to stop / start dropbox in the Apple Terminal?

dropbox stop works when using Oracle Linux, but not within Mac OS 10.6.8.

15

Contrary to Linux, the main Dropbox functionality is in Dropbox.app itself. You wouldn't want to kill the background daemon (dbfseventsd), which does not have a command-line interface. So, it's not the same as in Linux.

The safest way to quit Dropbox is to run the following:

osascript -e 'tell application "Dropbox" to quit'

You can start it again by calling:

open -a "Dropbox"
  • This doesn't kill a hanging DropBox icon in the menu bar for me. It gives 30:34: execution error: Dropbox got an error: AppleEvent timed out. (-1712) – Jeroen Wiert Pluimers Apr 12 '14 at 6:52
  • @Jeroen You might have to use a kill command then, with the process ID of Dropbox. Or perhaps restart the machine. – slhck Apr 12 '14 at 7:20
  • killall works; see my other answer that has an alias for restarting Dropbox (first trying the friendly way, then the brutal way) – Jeroen Wiert Pluimers Apr 12 '14 at 7:26
  • @slhck I would like to simply start the dropbox daemon when I log into a Mac via ssh, without using the GUI. Could I run dbfseventsd? In case, where do I find it? – Valerio Jul 19 '17 at 19:36
  • @Valerio I'm not sure it's that easy. The file is /Library/DropboxHelperTools/Dropbox_u502/dbfseventsd for me. Does open variant not work? Sorry that I have no better answer. – slhck Jul 19 '17 at 20:00
24

In addition to the answer by slhck:

When the DropBox menu icon hangs and shows the rainbow wheel/spinning wheel then the below command will kill Dropbox:

killall Dropbox

Then you can start it with open -a "DropBox" like https://superuser.com/users/48078/slhck mentioned.

This is the alias I have defined for restarting Dropbox:

alias restartDropBox="osascript -e 'tell application \"Dropbox\" to quit';killall Dropbox;open -a \"Dropbox\""

Note the:

NB: The 300% enlarged spinning wheel is from WikiMedia.
enter image description here

  • 2
    Getting LSOpenURLsWithRole() failed for the application /Applications/Dropbox.app with error -600. when restarting - but the killall Dropbox command worked perfectly – 1owk3y Nov 2 '17 at 13:58

Your Answer

By clicking "Post Your Answer", you agree to our terms of service, privacy policy and cookie policy

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