12

I recently got a new Windows computer and would like to dual boot with Ubuntu. I don't really want to have 2 separate file systems (with mounting) but would like to integrate the two, if it is possible. Like for example I would like my /home/name/Pictures to have the same content as the Pictures folder in My Documents in windows, /home/name/Downloads to be the same as the Downloads folder in windows, Music to be the same as the window's Music folder, and even Desktop if possible. I understand some folders would have to be different, like AppData in windows would not be able to work properly so some duplicates might be necessary.

Is this at all possible? I hate how having Ubuntu feels like having a new computer all together and would like some unity (no pun intended).

Thanks.

Jorge Castro
  • 71,754
dukevin
  • 1,087
  • 1
  • 10
  • 19
  • 1
    Related: http://ubuntuforums.org/showthread.php?t=1975262 – dukevin Aug 20 '12 at 22:27
  • That just reminded me of the migration-assistant which was dropped from the Live CD installer due to lack of interest. But I think a tool which shares data of certain applications from the Windows partition with Ubuntu or at least helping the user doing that would be appreciated by lots of the dual booting users in the community. From all I've seen until now Ubuntu for Android does something similar from the user's point of view. Granted, mounting a partition and placing symbolic links is not that fancy. – LiveWireBT Aug 22 '12 at 23:05

4 Answers4

11

Prerequisites

You have to have the Windows partition mounted in Ubuntu to make the following work .

Redirecting special folders

An equivalent of special folders (My Documents, My Music, My Pictures, etc) known from Windows folders was defined by the freedesktop.org project. The correspondig configuration file ~/.config/user-dirs.dirs is managed by the xdg-user-dirs-update command.

You could, for example, change the download directory by executing the following command in the terminal:

xdg-user-dirs-update --set DOWNLOAD /mnt/<WINDOWS_PARTITION>/users/<YOU>/Downloads

Another way to achieve the same is to manually replace $HOME/Downloads by /mnt/<WINDOWS_PARTITION>/users/<YOU>/Downloads in the configuration file (e.g. in gedit or nano).

To have the changes take effect run xdg-user-dirs-gtk-update afterwards and additionally xdg-user-dirs-update if you have edited the configuration file by hand.

Redirecting regular folders

You can also replace folders on your Ubuntu home folder with symbolic links to the folders on your Windows partition e.g.:

ln -s /mnt/<WINDOWS_PARTITION>/users/<YOU>/AppData/Roaming/Mozilla/Firefox/Profiles/<YOUR_PROFILE.default> ~/.mozilla/firefox/<YOUR_PROFILE.default>

That is a very simple solution and it does not work for everything, it might cause issues in some cases. However some people share settings for Firefox and Thunderbird that way.

Koen
  • 532
LiveWireBT
  • 28,763
  • I've tried this for some files but I have to mount the "OS" drive first which is really annoying. Otherwise it says "broken link" – dukevin Aug 20 '12 at 21:49
  • One important thing is to do everything in terminal - Gnome tracks operations with "special" folders when they're performed via file manager, so if you delete/rename the original Pictures folder in Nautilus and create a symlink in its place - it won't behave as the original Pictures folder did – Sergey Aug 20 '12 at 21:50
  • @KevinDuke: you need to add a line to /etc/fstab to auto-mount the windows partition on boot. Search this site for instructions. – Sergey Aug 20 '12 at 21:52
  • @Sergey thanks, I think auto-mount would be the way to go. How does this effect performance? – dukevin Aug 20 '12 at 21:55
  • @KevinDuke: I don't see how it could affect performance, except maybe the boot process taking a split-second longer. – Sergey Aug 20 '12 at 22:27
  • Thanks for all your answers. One more if I may: How does making symblinks compare to mattdavis's answer below? Would it just be two different ways to achieve the same thing? What differences would there be between the two methods? – dukevin Aug 20 '12 at 22:32
  • Editing ~/.config/user-dirs.dirs would be much more elegant. –  Aug 20 '12 at 23:37
  • and, you can use ntfs-config to set up auto mount; easy gui, no need to mess with /etc/fstab – Ubuntuser Aug 21 '12 at 08:35
  • @KevinDuke I think user-dirs just handles a few special folders while with symbolic links you can do everything, even shoot yourself in the foot. Go with user-dirs if possible. – LiveWireBT Aug 21 '12 at 09:17
2

Type this in terminal

gedit ~/.config/user-dirs.dirs

and link up to the absolute path of the windows folders. Then you can just "killall nautilus" or possibly reboot.

  • This is quite interesting. Does this work without mounting the drive? And how does this compare to making symlinks? – dukevin Aug 20 '12 at 22:19
  • No, you do need to mount the drive. This right here will get that going for you at startup. The benefit for you would be having the list right in front of you rather than making a series of symlinks in the terminal. – matt davis Aug 21 '12 at 00:15
1

Yes, it is possible. I don't think it will display the same way since they use different icon sets. It should however display the same files and folders you may have placed on your desktop.
The problem you will likely run into with those is that windows references those files and folders from different relative starting points. (If you click them you'll get a "File not found" error.)

If, for some reason, you wish to continue, find your Ubuntu "Desktop" folder in your home folder. Rename it to something else like "desktop.bak" so you can undo this later. Open a terminal and enter 'ln -s /path_to/windows/Desktop Desktop'

Open your home folder and click on the new Desktop link. You should see the files and folders referenced on your Windows desktop. (For curiosity's sake, try clicking on them and see if any of them work.)

You should be able to log out and back in to see what you have on your desktop. If you find this isn't what you wanted, just delete the symlinked "Desktop" and rename the "desktop.bak" to "Desktop".

Argusvision
  • 1,711
0

Mount the Windows partition, then mount --bind its directories under your home. This makes your applications access the Windows partition transparently.

ignis
  • 4,197