In ~/.config/user-dirs.dirs you can change the user folders. But do they actually do anything except for changing the links in Nautilus? I can see that changing XDG_DESKTOP_DIR does something – namely it changes the contents of which folder are displayed on the desktop, as expected – but does anything else do something?

1 Answer 1


These are special locations as defined by freedesktop.org, and so is used by many programs, not only nautilus. They will be used by any file manager (dolphin, Thunar) and by apps - the Music directory by music players, Downloads by browsers, Documents by text editors, etc.



xdg-user-dirs is a tool to help manage "well known" user directories like the desktop folder and the music folder. It also handles localization (i.e. translation) of the filenames.

The way it works is that xdg-user-dirs-update is run very early in the login phase. This program reads a configuration file, and a set of default directories. It then creates localized versions of these directories in the users home directory and sets up a config file in $(XDG_CONFIG_HOME)/user-dirs.dirs (XDG_CONFIG_HOME defaults to ~/.config) that applications can read to find these directories.

There is a nice discussion on the Arch wiki , see https://wiki.archlinux.org/index.php/Xdg_user_directories

  • I think you mean "${XDG_CONFIG_HOME}/user-dirs.dirs"
    – Tom Hale
    Sep 26, 2016 at 15:05
  • @TomHale "XDG_CONFIG_HOME defaults to ~/.config" ALL CAPS are variables and can be set as an environmental vriable - askubuntu.com/questions/730/how-do-i-set-environment-variables
    – Panther
    Sep 26, 2016 at 17:39
  • Yes, but you want { not ( for sh, bash, zsh... Also, you should quote with "s just incase there are spaces or other nasty characters in the variable.
    – Tom Hale
    Sep 27, 2016 at 2:08
  • @TomHale - You can send a request to the documentation team if you want them to update the man page or file a bug report if you think they should modify how they handle the environmental variable.
    – Panther
    Sep 27, 2016 at 14:57

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.