0

I am using Ubuntu 12.04. I'm trying to change the path from the special folders (I mean the ones in my home directory) to folders on my external HDD. I already auto-mounted the HDD by adding a UUID-command to the start-up applications

/usr/bin/udisks --mount /dev/disk/by-uuid/7a92f7dd-bd54-4a1c-88eb-be7eea04e79a

That's the one.

Now I tried to edit ~/.config/user-dirs.dirs, but every time I reboot it goes back to the home folder

Am I missing something somewhere?

Aditya
  • 13,416

2 Answers2

0

First of all you need to make sure that your external hard drive actually automatically mounts successfully on-boot.

The way you're automatically mounting your drive is not recommended. Please see How To Automatically Mount NTFS Partitions (if your external hard drive or any of its partitions isn't NTFS, just change the format to whatever it is instead of NTFS) on how to automatically mount partitions/external-media on boot by editing the /etc/fstab file.

After that, what I do is make symbolic links to the folders in my external hard drive in my /home folder.

  • To do that, use the ln command as follows:

    ln -s <target-path> <link>

  • So for example, to link my Music folder to a folder in my external hard drive which has my music files, I do the following:

    ln -s /mnt/data/Music ~/Music.

  • Then I check my ~/.config/user-dirs.dirs file, ensuring no entry is left blank.

oaskamay
  • 647
  • 1
  • 9
  • 21
  • You will not be able to create the symbolic link ~/Music unless you remove the folder ~/Music first. – mook765 Jul 25 '19 at 19:35
0

Creating a symlink is only half the work done as the old folders would continue to exist along with the new symlink created. I encountered this problem when I was trying to change the path of my desktop to ubuntu one folder first using the instruction mentioned in this how-to.

And later from the above. In both the instances desktop changed to Ubuntu One. When I tried to access the desktop from nautilus, the old desktop would pop-up and not the Ubuntu One. Only the link on the sidebar of the nautilus led to the new changed location in case of the instruction mentioned in the above link. Whereas in the above instruction it created a symlink inside the folder that I wanted to replace.

The solution to this query, in my opinion, has been satisfactorily answered in: Can I change personal folder locations?

check it out