Translation(s): none
The XDG Base Directory Specification (XDGBDS) defines five 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, state and runtime files.
Please refer to the specification for directory definitions and further details. Debian does not require that packages conform to the XDGBDS but strongly encourages upstreams to do so. Debian packages should not be patched for conformance to avoid unnecessary deviation from upstream and other distributions.
Tools and libraries
Debian contains several libraries for different languages that help to implement the XDGBDS:
Haskell: haskell-xdg-basedir
Python: python-xdg/python3-xdg
C++/QT: libqtxdg
C/Gnome: via glib)
These tools or libraries exists but are not yet packaged:
xdgdirs Guile, Lisp, Scheme, ???
Status of Packages
Debian does not require packages to conform to the XDGBDS and there is not (yet) a coordinated effort to encourage upstreams to do so. But to avoid duplication of effort we can collect upstream bug reports here regarding XDGBDS conformance.
emacs: upstream bug
mplayer: upstream bug
xmonad: upstream bug
spacemacs (needs packaging): upstream bug
Gimp: https://gitlab.gnome.org/GNOME/gimp/commit/60e0cfe, https://gitlab.gnome.org/GNOME/gimp/commit/483505f, https://bugzilla.gnome.org/show_bug.cgi?id=166643, https://bugzilla.gnome.org/show_bug.cgi?id=646644
A bigger list of bugs can be found in Arch Linux wiki: https://wiki.archlinux.org/index.php/XDG_Base_Directory
Bugs not yet filled/found: mplayer
Links
Modify your application to use XDG folders - Blog post from Lionel Dricot
Fedora initiative to make packages conform to XDGBDS
Gnome Goal to conform to XDGBDS
XDG Base Directory in Arch wiki - long list of software that supports the spec
Some questions that might help to distinguish between the different classes:
|
DATA |
CONFIG |
STATE |
CACHE |
RUNTIME |
sync across machines? |
yes? |
yes |
no |
no |
no |
manage in VCS (Git/SVN)? |
no |
yes |
no |
no |
no |
should be backed up? |
yes |
yes |
yes |
no |
no |
can live in tmpfs? |
no |
no |
no |
yes |
yes? |
contains much data? |
yes |
no |
no |
yes |
no |