Talk:XDG user directories

From ArchWiki
Jump to: navigation, search

CACHE, CONFIG, DATA directories

How to these XDG specification directories fit in?:

export XDG_CACHE_HOME="${HOME}/.cache"
export XDG_CONFIG_HOME="${HOME}/.config"
export XDG_DATA_HOME="${HOME}/.config"

The above block is something I saw written into a ~/.bashrc. How do they fit in?

I've tried typing env doesn't list them, yet I know applications use them. Are they hard-coded in applications? By the way, XDG_DATA_HOME should probably by default be $HOME/.local/share as talked about here.

-- Gen2ly (talk) 17:29, 14 September 2014‎ (UTC)

The difference is between xdg-user-dirs (note that it is in Software section) and XDG Base Directory Specification. From the latter:
"$XDG_CONFIG_HOME defines the base directory relative to which user specific configuration files should be stored. If $XDG_CONFIG_HOME is either not set or empty, a default equal to $HOME/.config should be used."
Hence the applications are expected to set the default value by themselves. Some applications use third-party libraries, and some even hard-code $HOME/.config/ (or something else) and deviate from the specification.
-- Lahwaacz (talk) 17:53, 14 September 2014 (UTC)