0

I've been using Dropbox and symlinks to keep two Ubuntu computers in sync, for years.

The setup is a bit fiddly, because some links go TO the Dropbox folder, and some come FROM it, depending on how things are set up, but I haven't had any problems.

Now, I want to simplify things, but I'm a bit concerned about existing directories. Specifically, Desktop, Downloads, and Pictures.

My thinking is that it should be ok to do, on both computers, this:

me@computer:~$ ln -sfn /home/me/Dropbox/Desktop /home/me/Desktop

But maybe Gnome treats Desktop as some sort of special directory. I tried it with the Downloads directory, and the system won't allow me overwrite it, even with sudo.

Any ideas?

1 Answers1

0

I would use the mount command's bind option to sync the two computers as this would prevent the removal of the Desktop folder so the link command would not re-create the Dropbox folder in that location. The terminal command to use to achieve this is:

sudo mount --bind ~/Dropbox  ~/Desktop

or

sudo mount -o bind ~/Dropbox  ~/Desktop

To make this permanent add the following line to the /etc/fstab file:

/home/$USER/Dropbox         /home/$USER/Desktop    none     rw,bind,nowaitboot     0     0

This nowaitboot ensures that if the dropbox folder isn't there your system will still boot.

George Udosen
  • 37,534