XDG Environment Variables
MaXX Desktop XDG Environment Variables
Name |
Description |
Default |
XDG_DATA_HOME |
Defines the base directory relative to which user specific data files should be stored |
$HOME/.local/share |
XDG_CONFIG_HOME |
Defines the base directory relative to which user specific configuration files should be stored |
$HOME/.config |
XDG_DATA_DIRS |
Defines the preference-ordered set of base directories to search for data files in addition to the $XDG_DATA_HOME base directory. The directories should be separated with a colon ':' |
/usr/local/share/:/usr/share/ |
XDG_CONFIG_DIRS |
Defines the preference-ordered set of base directories to search for configuration files in addition to the $XDG_CONFIG_HOME base directory. |
/etc/xdg |
XDG_CACHE_HOME |
Defines the base directory relative to which user specific non-essential data files should be stored. |
$HOME/.cache |
XDG_RUNTIME_DIR |
Defines the base directory relative to which user-specific non-essential runtime files and other file objects (such as sockets, named pipes, ...) should be stored. The directory MUST be owned by the user, and he MUST be the only one having read and write access to it. Its Unix access mode MUST be 0700. The lifetime of the directory MUST be bound to the user being logged in. Applications should use this directory for communication and synchronization purposes and should not place larger files in it, since it might reside in runtime memory and cannot necessarily be swapped out to disk. |
XDG Reference https://specifications.freedesktop.org/basedir-spec/basedir-spec-latest.html#variables
Notes on all XDG variables
- The order of base directories denotes their importance; the first directory listed is the most important. When the same information is defined in multiple places the information defined relative to the more important base directory takes precedent.
- The base directory defined by $XDG_DATA_HOME is considered more important than any of the base directories defined by $XDG_DATA_DIRS.
- The base directory defined by $XDG_CONFIG_HOME is considered more important than any of the base directories defined by $XDG_CONFIG_DIRS.