Running multiple copies of Dropbox in Linux (at the same time!)

Multiple copies of dropbox in Linux

TL;DR: Grab the attached script, and use it to install and/or run additional Dropbox instances in Linux! (It gives you usage instructions if you run it with no parameters)

I use Dropbox. My wife also uses Dropbox. We wanted to use Dropbox at the same time, on the same computer, without needing to have separate user accounts.

The Dropbox application doesn't allow this; all of the settings / configuration / etc are stored in hard-coded locations (~/.dropbox and ~/.dropbox-dist).

It is, however, incredibly easy to change this... we simply need to change the location of "$HOME" (an environment variable that tells Linux where your personal files are... normally /home/username).

We can change it temporarily simply using:

HOME=$HOME/subdirectory yourCommandHere

Assuming ~/subdirectory exists, yourCommandHere will then believe that it is your home directory.

To install our additional Dropbox we need to use:

HOME=/new/dropbox/location /usr/bin/dropbox start -i

The normal installer will pop-up, so simply follow them as usual!

In order to start this additional Dropbox in future, we can just use:

HOME=/new/dropbox/location /usr/bin/dropbox start

Now... running multiple copies of Dropbox is great, but it's difficult to tell which is which! So I wanted to use different icon sets for each of the instances.

"Nick" has made a portable version of Dropbox called "Dropbox Portable AHK", which contains a range of differently coloured sets of the 5 icons we need (see the image). I won't include them here, as that would be improper. However it was pretty easy to extract them (DropboxPortableAHK.exe needs to be decompressed using UPX, before the resources can be extracted).

The .ico files then need to be converted to .png, the easiest way (requires imagemagick) is probably:

for i in *.ico; do convert $i  "${i%.ico}.png" ; done

Five of the .pngs now need to be renamed and moved into /new/dropbox/location/.dropbox-dist/images/hicolor/16x16/status/ to replace the default versions.

You may be done... when you restart Dropbox, it will find and use the new icons. However, many themes contain Dropbox icons that will be used instead, so these need to be removed. With Xubuntu, the default theme (elementary-xfce-dark) and its parent (elementary-xfce) both contain them, so we need to run:

sudo rm /usr/share/icons/elementary-xfce-dark/panel/22/dropboxstatus-*.png
sudo rm /usr/share/icons/elementary-xfce/panel/22/dropboxstatus-*.png
sudo gtk-update-icon-cache /usr/share/icons/elementary-xfce-dark/
sudo gtk-update-icon-cache /usr/share/icons/elementary-xfce/

Finally, I made a script to automate the install and running of additional Dropbox instances. Download it, make it executable, and put it somewhere in your path (probably ~/bin/). And most importantly - edit it! It defaults to a "BASEFOLDER" of "/home/nathan/Dropboxes" so you will want to change this to be a directory that exists, inside your own home directory.

To use it is then simple... if you want to install an alternative Dropbox instance, then give two parameters:

dropboxAlt uniqueName install

If you want to run an alternative Dropbox instance, give only one:

dropboxAlt uniqueName

And to run all existing alternative Dropbox instances, use:

dropboxAlt all

Plain text icon dropboxAlt1.67 KB