Ask Ubuntu is a question and answer site for Ubuntu users and developers. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

What are the functions and capabilities of xdg-user-dirs? In particular, I'm interested to have the folders it creates on a different partition instead of the whole Home.

share|improve this question
up vote 4 down vote accepted



Sysadmins can configure things by editing /etc/xdg/user-dirs.conf. At the moment there are only two settings, you can disable the whole thing, and you can specify the charset encoding used for filenames. They can also set or change the default directories and their initial values in /etc/xdg/user-dirs.defaults.

$(XDG_CONFIG_HOME)/user-dirs.dirs specifies the current set of directories for the user. This file is in a shell format, so its easy to access from a shell script. This file can also be modified by users (manually or via applications) to change the directories used. Note: To disable a directory, point it to the homedir. If you delete it it will be recreated on the next login.

share|improve this answer
Where is this config file located on Ubuntu? – Oxwivi Mar 9 '11 at 16:32
@oxwivi Try $HOME/.config/user-dirs.dirs . – belacqua Mar 9 '11 at 17:20
@jgbelacqua, @DoR, if I point the directory to a nonexistent folder, will it create it automatically? – Oxwivi Mar 9 '11 at 18:28

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.