user5429087 user5429087 - 6 months ago 21
Linux Question

How to - multiple dropbox instances in Linux?

After looking around online it seems pretty easy to have multiple dropbox accounts running. All you have to do is change an environmental variable and then run dropbox. However, I've tried editing the .desktop file (see .desktop file specification) so the Exec line is changed from this:

Exec=dropbox start -i


which is the default, to this:

Exec=env "HOME\=/home/reg/.dropbox-alt" dropbox start -i


which from everything I have read should work. I've also tried all the variations of escaping and quoting like:

Exec=env HOME\=/home/reg/.dropbox-alt dropbox start -i
Exec=env "HOME=/home/reg/.dropbox-alt" dropbox start -i
Exec=env HOME=/home/reg/.dropbox-alt dropbox start -i


and nothing seems to launch dropbox. However if I try the same line in bash it tries to launch but falls short but that's only because dropbox is looking for a GUI. That being the case I would have thought that doing the above in the .desktop file would work but I get nothing at all happening.

I'm doing this without any dropbox instances running already so it cannot be that dropbox is looking for other instances and stopping itself from loading another instance.

If I try this in the .desktop file:

Exec=env dropbox start -i


It will launch dropbox but now it's the default instance which has no benefit.

Can anyone tell me what I'm missing to make this work?

Answer

Open a terminal and paste the following commands:

$ mkdir "$HOME"/.dropbox-alt
$ ln -s "$HOME/.Xauthority" "$HOME/.dropbox-alt/"
$ HOME="$HOME/.dropbox-alt"
$ /home/$USER/.dropbox-dist/dropboxd

Dropbox setup wizard window will appear. Finish the setup similarly as described in Method -1

start Dropbox from terminal

$ /home/$USER/.dropbox-dist/dropboxd

start Alternate-Dropbox from terminal

$ HOME="$HOME/.dropbox-alt" && /home/$USER/.dropbox-dist/dropboxd

Note:

You can create a small script with the above commands to start Dropbox.
One can put the script at startup. Don't forget to give the script execution permission.

chmod +x /path/to/script

I have tested the second method. Hope it will be useful.