Change the location of subfolders in your Home partition

Not only can you change your desktop folder, you can change the location of any other folder Ubuntu creates for you in your home folder, like Documents or Music – and this works in any Linux distribution using the Gnome desktop manager.

sshot-1

In this example, we’re going to change desktop to show our Dropbox folder. Open your home folder in a File Browser by clicking on Places > Home Folder.

screenshot_002

In the Home Folder, open the .config folder. By default, .config is hidden, so you may have to show hidden folders (temporarily) by clicking on View > Show Hidden Files.

sshot-2

Then open the .config folder by double-clicking on it.

screenshot_006

Now open the user-dirs.dirs file…

screenshot_007

If double-clicking on it does not open it in a text editor, right-click on it and choose Open with Other Application… and find a text editor like Gedit.

Change the entry associated with XDG_DESKTOP_DIR to the folder you want to be shown as your desktop. In our case, this is $HOME/Dropbox.

Note: The “~” shortcut for the home directory won’t work in this file (use $HOME for that), but an absolute path (i.e. a path starting with “/”) will work.

screenshot_009

Feel free to change the locations of the other folders as well.

Save and close user-dirs.dirs. At this point you can either log off and then log back on to get your desktop back, or open a terminal window Applications > Accessories > Terminal and enter:

killall nautilus

Nautilus (the file manager in Gnome) will restart itself and display your newly chosen folder as the desktop!