How-To Geek

Use Any Folder For Your Ubuntu Desktop (Even a Dropbox Folder)

By default, Ubuntu creates a folder called Desktop in your home directory that gets displayed on your desktop. What if you want to use something else, like your Dropbox folder? Here we look at how to use any folder for your desktop.

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.


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.


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.


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


Now open the user-dirs.dirs file…


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.


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!


This is a cool trick to use any folder for your Ubuntu desktop. What did you use as your desktop folder? Let us know in the comments!

Trevor is our resident Linux geek, but always keeps his eyes open for neat Windows tricks too.

  • Published 05/20/10

Comments (26)

  1. Zebastian

    Would really love to auto-share desktops between computers by going for the dropbox folder. However, in order to motivate myself to tidy up as I go along, I use the desktop as default download location. Bummer.

    Though I can imagine many people would find this sweet :).

  2. Brian J Minogue

    Please tell me if Register Booster 2010 is any good.
    Thgank you,

  3. Joe Isaac

    I really like your articles. You explain things so well. I have Windows 7 and over 90% of computer
    users have some form of Windows, would you please write more about Windows.

    Ubuntu may be great, but why so much about it.


    Joe Isaac

  4. Trevor Bekolay

    @Brian J Minogue

    While this really isn’t the right article to bring that up, I refer you to this Lifehacker article.

    @Joe Isaac

    Thanks for the kind words! Windows is definitely a more popular platform, and I use it at home too. Of course, since it’s more popular, there are more sites on the net covering tips and tricks for it, so it’s sometimes harder to come up with new and unique material. In any case, I won’t keep looking for Windows tips, so stay tuned!

  5. emma

    It did’nt worked in ubuntu 10.01

  6. Trevor Bekolay


    I just tried this in 10.04 and it worked fine. Make sure you do the “killall nautilus” step, or else log out and then log back in again.

  7. Herb Smith

    Just a thank you for all the How To’s you have been providing us for years. Personally they have helped tremendously. Your site has provided me with numerous answers to everyday questions and many thing I would not have ever known about except for your help. Thank you

  8. linda

    Have very little computer knowledge want to e-mail pictures help! please….!

  9. Trevor Bekolay


    If you can figure out how to post a comment on How-To Geek, you can e-mail a picture. Just look for the word “attachment” in your e-mail client (be it Outlook, Gmail, whatever) and click on it.

    If you need more detailed help, please go to our forums.

  10. emma

    I did this as it is mentioned but not working and am also doing it in ubuntu 10.04

  11. Sven

    Thanks for this useful tip!
    I was looking for a way to link my Desktop, Documents and Downloads folder with the already existing folders in my windows partition.

    Now, with this linked desktop documents and downloads folder I have access to a continuous working environment when switching between Ubuntu and windows!

    Oh and as a side note, I’ve also linked my firefox profile with the firefox profile on the windows partitation, that way even bookmarks, history and browser settings/addons are shared

  12. feedrate

    @Sven ! I was looking for exactly that to – But can get it to work ! Can you post an example here please…

  13. feedrate

    Anybody ??? :)

  14. sudoman

    1 Open the terminal

    (Applications–>Accessories–>Terminal from the main menu on the panel)

    2 type this:

    gedit ~/.config/user-dirs.dirs

    2a Press Enter

    3 put this line into the file:


    4 Save the file.

    5. In terminal, type this:

    killall nautilus

    5a Press Enter

    6. If this didn’t work, reboot the computer.

    This puts the contents of your home folder on the desktop.

    For those of you who detect sarcasm in the “press enter” instructions, you are absolutely correct.

  15. Orlisco

    Any suggestions on how to mount a NAS so that I can see it remotely (through Rbrowser or similar on my MAC). I can mount the NAS folder on the Ubuntu desktop (I am assuming as NFS or SMB, not sure) and see it fine. However, that mount doesn’t “carry” through when I access the Ubuntu box remotely (SSH, SFTP, etc.). any ideas on how to resolve? Thanks

  16. boehmi

    This doesn’t work like this, at least not in Lucid. What you’re doing, is changing what folder gets the desktop folder icon assigned, it doesn’t change the bookmark in nautilus.

    To do so, open nautilus and change the folder in “Bookmarks” -> “Edit Bookmarks” or just press Ctrl+B.

  17. Darsh Trivedi


    since me knew to Ubuntu techniques appreciate the help provided by you people..

    I changed my pictures directory and also can view as screen saver now…. :) :) :)


  18. Rig'dzin Dorje

    I used to use the desktop like this for exactly the same reason. Now I use UbuntuOne as my default download location, in the web browser & other applications, and I put a link to the UbuntuOne folder inside the Dropbox folder. One might just as easily do that the other way round.

  19. Matt

    How would you set the desktop to be a network drive because i have a folder shared on my network that i would like to use as my desktop.


  20. qtchic86

    This is a great advice for Ubuntu, but I have searched high and low for the same solution for Windows and can’t find it. Could you be so kind as to post a how-to for Windows desktop?

  21. qtchic86

    Actually, I was able to figure it out…

    1) Go to C:\Users\YOUR_USER
    2) Right click “Desktop” folder, then click “Properties”
    3) Click the “Location” tab
    4) Click “Move” and browse to the folder you want to use for your Desktop.

  22. Shahab

    Thx dude. worked out of box :-)

  23. John

    Thanks! Great article!

    I have a question though. Do you know how I could change the icon associated with an “xdg” folder I create in the “user-dirs.dirs” file?

  24. Ray

    Great, it works. Thank you!

  25. oddeofun

    awesome! this has been driving me bananas all day.

  26. Andrew

    Is there a way to set this globally for all users?

More Articles You Might Like

Enter Your Email Here to Get Access for Free:

Go check your email!