I have many documents, backups, movies, photos which I have in a Windows data partition (D: drive) that is on the same box as my Ubuntu installation.
I want to be able to use this from Ubuntu, with the directories being accessible in the home directory. For example, in my home directory, the Pictures, Downloads, Documents folders would all point to the NTFS parition:
/media/DataNtfs/Pictures /home/can/Pictures
/media/DataNtfs/Downloads /home/can/Downloads
/media/DataNtfs/Documents /home/can/Documents
/media/DataNtfs/Backups /home/can/Backups
I tried adding
/media/DataNtfs/Music /home/can/Music none rw,bind
to the fstab and it worked.
I think a symbolic link could also work.
For example,
rm -rf ~/Music && ln -s /media/DataNtfs/Music ~/Music
Changing xdg-user-dirs
may work too.
The drive is already mounted at boot time:
UUID=2614A82F14A803C1 /media/DataNtfs ntfs defaults,umask=007,gid=46 0 0
Also, I've found out that I can also use Ubuntu Tweak to do this.
Given that I'm new to Ubuntu, can someone tell me the recommended way to accomplish this?
I think I figured out what is the best way. Firstly I used tweak tool. Tweak tool used
xdg
thing. I just don't like it so much. Then I used symbolic links for all of my old directories from/home/can
to/media/DataNtfs
. For example;ln -s /media/DataNtfs/Music ~/Music
. It was simple and useful until I wanted to sync my Documents directory with Ubuntu One. Ubuntu One syncs directories only in the home folder and don't work with links. Then I create empty directories in home like Documents, Downloads, Pictures etc.. and used fstab file to bind my old NTFS directories to the empty directories. This is part of the fstab file:Bind works well. Now I can sync some of data directories with Ubuntu One. As if data directories are actually in the home directory. So I think 'the best way' is bind.
By the way; DataNtfs partition is always mounted by fstab and I never unmount it.
Unless the partitions are already mounted, the latter two techniques wouldn't work. However you can try mounting them using
fstab
at boot and see if they work.No, a symbolic link would not work. The reason is links only work if the linked file is on the same partition as the link itself.
You'd be able to create a link, but once you unmount the partition and open the link it'd give you something like this:
The bottom line is: Links are good as long as the other partition is mounted. Links cannot mount the partition for you.
Similarly when you modify your xdg-users-dirs using
~/.config/user-dirs.dirs
, it won't work. When I tried to change my Music directory to something else in other partition, it didn't work even after a restart.