Using Dropbox in Linux

Beginning in late Fall 2013, the Dropbox software no longer works properly with network home directories. For the systems in our department, we have the following remedy.

This procedure will:

  • Move existing dropbox directories to a backup folder on this computer located in /scratch/USERNAME/.mathscript-dropboxbackup
  • Create links to move Dropbox to the folder /scratch/USERNAME on this computer
  • Install a fresh copy of dropbox and place it in the appropriate locations

Important! -- You will need to perform this procedure on each individual computer used. If an office computer is changed or you sit at a different lab computer, this will need to be done on that new computer to install dropbox for your use on that computer

Each time this is run, all of your files will take some time to re-download


  1. Open a Terminal window (Start / System / Konsole).
  2. Copy and paste these commands, including punctuation and brackets. Dropbox will open either a program window or in a web browser and ask for your account information:

    dropbox stop
    killall -q dropbox >/dev/null 2>&1
    killall -q dropboxd >/dev/null 2>&1
    MATHDBSCRIPTDATE=`date +%Y-%m-%d_%H.%M.%S`
    mkdir /scratch/${USER}/.mathscript-dropboxbackup-${MATHDBSCRIPTDATE}
    mkdir /scratch/${USER}/.mathscript-dropboxbackup-${MATHDBSCRIPTDATE}/home
    mkdir /scratch/${USER}/.mathscript-dropboxbackup-${MATHDBSCRIPTDATE}/scratch
    [ -h ${HOME}/.dropbox ] || mv -i ${HOME}/.dropbox /scratch/${USER}/.mathscript-dropboxbackup-${MATHDBSCRIPTDATE}/home/.dropbox
    [ -h ${HOME}/.dropbox-dist ] || mv -i ${HOME}/.dropbox-dist /scratch/${USER}/.mathscript-dropboxbackup-${MATHDBSCRIPTDATE}/home/.dropbox-dist
    [ -h ${HOME}/Dropbox ] || mv -i ${HOME}/Dropbox /scratch/${USER}/.mathscript-dropboxbackup-${MATHDBSCRIPTDATE}/home/Dropbox
    [ -e /scratch/${USER}/.dropbox ] && mv -i /scratch/${USER}/.dropbox /scratch/${USER}/.mathscript-dropboxbackup-${MATHDBSCRIPTDATE}/scratch/.dropbox
    [ -e /scratch/${USER}/.dropbox-dist ] && mv -i /scratch/${USER}/.dropbox-dist /scratch/${USER}/.mathscript-dropboxbackup-${MATHDBSCRIPTDATE}/scratch/.dropbox-dist
    [ -e /scratch/${USER}/Dropbox ] && mv -i /scratch/${USER}/Dropbox /scratch/${USER}/.mathscript-dropboxbackup-${MATHDBSCRIPTDATE}/scratch/Dropbox
    [ -h ${HOME}/.dropbox ] || ln -s /scratch/${USER}/.dropbox ${HOME}/.dropbox
    [ -h ${HOME}/.dropbox-dist ] || ln -s /scratch/${USER}/.dropbox-dist ${HOME}/.dropbox-dist
    [ -h ${HOME}/Dropbox] || ln -s /scratch/${USER}/Dropbox ${HOME}/Dropbox
    mkdir /scratch/${USER}/.dropbox
    mkdir /scratch/${USER}/.dropbox-dist
    dropbox start -i > /dev/null 2>&1 &

  3. After you successfully enter your account information in the program window or browser, Dropbox will be running.

    It is likely, at this point, that you will receive a pop-up saying that your folder is not on a supported drive. Click "Move", then enter the path as follows, using your own math username in the path:

    This will create the Dropbox data folder, which holds all of your synced files, in the location /scratch/username/Dropbox