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.


From http://www.freedesktop.org/wiki/Software/xdg-user-dirs:


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.

  • Where is this config file located on Ubuntu? – Oxwivi Mar 9 '11 at 16:32
  • 1
    @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 clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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