What is xdg directory specification?
The XDG Base Directory Specification (XDGBDS) defines four categories of so called DotFiles and the corresponding directories in a users home directory that should be used for those. The categories are cache, configuration, data and runtime files.
What is Linux xdg?
xdg-open command in the Linux system is used to open a file or URL in the user’s preferred application. The URL will be opened in the user’s preferred web browser if a URL is provided. The file will be opened in the preferred application for files of that type if a file is provided.
What is xdg CONFIG?
$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. $XDG_STATE_HOME defines the base directory relative to which user-specific state files should be stored.
What is Freedesktop in Linux?
freedesktop.org (fd.o) is a project to work on interoperability and shared base technology for free-software desktop environments for the X Window System (X11) and Wayland on Linux and other Unix-like operating systems. It was founded by Havoc Pennington from Red Hat in March 2000.
How is the XDG base directory specification defined?
The XDG Base Directory Specification is based on the following concepts: There is a single base directory relative to which user-specific data files should be written. This directory is defined by the environment variable $XDG_DATA_HOME . There is a single base directory relative to which user-specific configuration files should be written.
What do I need to know about XDG RUNTIME DIR?
$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.
What should be stored in XDG _ state _ home?
The $XDG_STATE_HOME contains state data that should persist between (application) restarts, but that is not important or portable enough to the user that it should be stored in $XDG_DATA_HOME. It may contain: actions history (logs, history, recently used files, …)
Where to find XDG data in a subdir?
Such file should be installed to $datadir /subdir/filename with $datadir defaulting to /usr/share. A user-specific version of the data file may be created in $XDG_DATA_HOME /subdir/filename, taking into account the default value for $XDG_DATA_HOME if $XDG_DATA_HOME is not set.