XDG user directories

configurationdirectory-structurefreedesktop

After installing Linux Mint Debian edition my .config/user-dirs.dirs looks like this:

# This file is written by xdg-user-dirs-update
# If you want to change or add directories, just edit the line you're
# interested in. All local changes will be retained on the next run
# Format is XDG_xxx_DIR="$HOME/yyy", where yyy is a shell-escaped
# homedir-relative path, or XDG_xxx_DIR="/yyy", where /yyy is an
# absolute path. No other format is supported.
# 
XDG_DESKTOP_DIR="$HOME/Desktop"
XDG_DOWNLOAD_DIR="$HOME/Downloads"
XDG_TEMPLATES_DIR="$HOME/Templates"
XDG_PUBLICSHARE_DIR="$HOME/Public"
XDG_DOCUMENTS_DIR="$HOME/Documents"
XDG_MUSIC_DIR="$HOME/Music"
XDG_PICTURES_DIR="$HOME/Pictures"
XDG_VIDEOS_DIR="$HOME/Videos"

The idea is what applications should be able to locate a suitable directory for different kind of contents while still making it possible to have the directory names chosen by the user (who might for example want it localized). For instance Gnome and XFCE use $(xdg-user-dir DESKTOP) for the Desktop files if it is defined.

While I think these are fairly obvious:

  • DESKTOP
  • DOWNLOAD
  • DOCUMENTS
  • MUSIC
  • PICTURES
  • VIDEOS

I would like an example of what these should contain or which programs use them:

  • TEMPLATES
  • PUBLICSHARE

Best Answer

TEMPLATES is for, well, templates. For LibreOffice and such.

PUBLICSHARE can be used by content-generation software (use your imagination there) as a location for the final product for consumption by external entities.