Difference between revisions of "XDG Base Directory"

From ArchWiki
Jump to: navigation, search
(vimrc under user configuration folder $XDG_CONFIG_HOME)
(Partial: Add getmail configuration)
(123 intermediate revisions by 39 users not shown)
Line 3: Line 3:
 
{{Related articles start}}
 
{{Related articles start}}
 
{{Related|dotfiles}}
 
{{Related|dotfiles}}
{{Related|Xdg user directories}}
+
{{Related|XDG user directories}}
 
{{Related articles end}}
 
{{Related articles end}}
 
This article exists to catalog the growing set of software using the [http://standards.freedesktop.org/basedir-spec/latest/ XDG Base Directory Specification] introduced in 2003.  This is here to demonstrate the viability of this specification by listing commonly found dotfiles and their support status.  For those not currently supporting the Base Directory Specification, workarounds will be demonstrated to emulate it instead.
 
This article exists to catalog the growing set of software using the [http://standards.freedesktop.org/basedir-spec/latest/ XDG Base Directory Specification] introduced in 2003.  This is here to demonstrate the viability of this specification by listing commonly found dotfiles and their support status.  For those not currently supporting the Base Directory Specification, workarounds will be demonstrated to emulate it instead.
  
The workarounds will be limited to anything not involving patching the source, executing code stored in [[environment variable]]s or compile-time options.  The rationale for this is that configurations should be portable across systems and having compile-time options prevent that.
+
The workarounds will be limited to anything not involving patching the source, executing code stored in [[environment variables]] or compile-time options.  The rationale for this is that configurations should be portable across systems and having compile-time options prevent that.
  
 
Hopefully this will provide a source of information about exactly what certain kinds of dotfiles are and where they come from.
 
Hopefully this will provide a source of information about exactly what certain kinds of dotfiles are and where they come from.
Line 56: Line 56:
 
When contributing make sure to use the correct section.
 
When contributing make sure to use the correct section.
  
Nothing should require code evaluation (such as [[vim]] and {{ic|VIMINIT}}), patches or compile-time options to gain support and anything which does must be deemed hardcoded.  Additionally if the process is too error prone or difficult, such as [https://www.haskell.org/cabal/ Haskell's cabal] or eclipse, they should also be considered as hardcoded.
+
Nothing should require code evaluation (such as [[vim]] and {{ic|VIMINIT}}), patches or compile-time options to gain support and anything which does must be deemed hardcoded.  Additionally if the process is too error prone or difficult, such as [https://www.haskell.org/cabal/ Haskell's cabal] or Eclipse, they should also be considered as hardcoded.
  
* The first column should be the project name, ideally the command name if it is not ambigious, linked to their website or an appropriate internal wiki article.
+
* The first column should be the project name, ideally the command name if it is not ambiguous, linked to their website or an appropriate internal wiki article.
  
 
* The second column is for any legacy files and directories the project had (one per line), this is done so people can find them even if they are no longer read.
 
* The second column is for any legacy files and directories the project had (one per line), this is done so people can find them even if they are no longer read.
Line 74: Line 74:
 
! Discussion
 
! Discussion
 
! Notes
 
! Notes
 +
|-
 +
| [https://github.com/SirCmpwn/aerc aerc]
 +
|
 +
|
 +
|
 +
|
 
|-
 
|-
 
| [https://github.com/Antimicro/antimicro/ antimicro]
 
| [https://github.com/Antimicro/antimicro/ antimicro]
Line 81: Line 87:
 
|
 
|
 
|-
 
|-
| [https://github.com/tatsuhiro-t/aria2/ aria2]
+
| [[aria2]]
 
| {{ic|~/.aria2}}
 
| {{ic|~/.aria2}}
 
| [https://github.com/tatsuhiro-t/aria2/commit/8bc1d37 8bc1d37]
 
| [https://github.com/tatsuhiro-t/aria2/commit/8bc1d37 8bc1d37]
Line 87: Line 93:
 
|
 
|
 
|-
 
|-
| [http://www.blender.org/ blender]
+
| [http://littlesvr.ca/asunder/ Asunder]
 +
| {{ic|~/.asunder}}
 +
 
 +
{{ic|~/.asunder_album_artist}}
 +
 
 +
{{ic|~/.asunder_album_genre}}
 +
 
 +
{{ic|~/.asunder_album_title}}
 +
| [https://littlesvr.ca/bugs/show_bug.cgi?id=31 2.9.0]
 +
| [https://littlesvr.ca/bugs/show_bug.cgi?id=52]
 +
| Uses {{ic|XDG_CONFIG_HOME/asunder/asunder}} for {{ic|~/.asunder}} and {{ic|XDG_CACHE_HOME/asunder/asunder_album_...}} for the other 3 files. Legacy paths are not removed after migration, they have to be deleted manually.
 +
|-
 +
| [[blender]]
 
| {{ic|~/.blender}}
 
| {{ic|~/.blender}}
 
| [http://git.blender.org/gitweb/gitweb.cgi/blender.git/commit/4293f473 4293f473]
 
| [http://git.blender.org/gitweb/gitweb.cgi/blender.git/commit/4293f473 4293f473]
Line 109: Line 127:
 
| [https://github.com/citra-emu/citra/commit/f7c3193fec f7c3193fec]
 
| [https://github.com/citra-emu/citra/commit/f7c3193fec f7c3193fec]
 
| [https://github.com/citra-emu/citra/pull/575]
 
| [https://github.com/citra-emu/citra/pull/575]
 +
|
 +
|-
 +
| [[PHP#Composer|composer]]
 +
| {{ic|~/.composer}}
 +
| [https://github.com/composer/composer/releases/tag/1.0.0-beta1 1.0.0-beta1]
 +
| [https://github.com/composer/composer/pull/1407]
 
|
 
|
 
|-
 
|-
Line 179: Line 203:
 
| [https://github.com/FreeRDP/FreeRDP/commit/edf6e7258d edf6e7258d]
 
| [https://github.com/FreeRDP/FreeRDP/commit/edf6e7258d edf6e7258d]
 
|
 
|
 +
|
 +
|-
 +
| [[Gajim]]
 +
| {{ic|~/.gajim}}
 +
| [https://dev.gajim.org/gajim/gajim/commit/3e777ea8f120dc58d4e65ce501ab3ab3785a5d40 3e777ea]
 +
| [https://dev.gajim.org/gajim/gajim/issues/2149]
 
|
 
|
 
|-
 
|-
Line 185: Line 215:
 
| [https://git.gnome.org/browse/gconf/commit/?id=fc28caa7 fc28caa7]
 
| [https://git.gnome.org/browse/gconf/commit/?id=fc28caa7 fc28caa7]
 
| [https://bugzilla.gnome.org/show_bug.cgi?id=674803]
 
| [https://bugzilla.gnome.org/show_bug.cgi?id=674803]
 +
|
 +
|-
 +
| [[GIMP]]
 +
| {{ic|~/.gimp-x.y}}
 +
{{ic|~/.thumbnails}}
 +
| [https://git.gnome.org/browse/gimp/commit/?id=60e0cfe 60e0cfe] [https://git.gnome.org/browse/gimp/commit/?id=483505f 483505f]
 +
| [https://bugzilla.gnome.org/show_bug.cgi?id=166643] [https://bugzilla.gnome.org/show_bug.cgi?id=646644]
 
|
 
|
 
|-
 
|-
Line 193: Line 230:
 
|
 
|
 
|-
 
|-
| [http://gstreamer.freedesktop.org/ gstreamer-1.0]
+
| [http://gstreamer.freedesktop.org/ gstreamer]
|
+
| {{ic|~/.gstreamer-0.10}}
 
| [http://cgit.freedesktop.org/gstreamer/gstreamer/commit/?id=4e36f93924cf 4e36f93924cf]
 
| [http://cgit.freedesktop.org/gstreamer/gstreamer/commit/?id=4e36f93924cf 4e36f93924cf]
 
| [https://bugzilla.gnome.org/show_bug.cgi?id=518597]
 
| [https://bugzilla.gnome.org/show_bug.cgi?id=518597]
Line 278: Line 315:
 
| [https://www.midnight-commander.org/ticket/1851]
 
| [https://www.midnight-commander.org/ticket/1851]
 
|
 
|
 +
|-
 +
| [[Mercurial]]
 +
| {{ic|~/.hgrc}}
 +
| [https://www.mercurial-scm.org/repo/hg/rev/354020079723 354020079723] [https://www.mercurial-scm.org/wiki/Release4.2 4.2]
 +
|
 +
| {{ic|XDG_CONFIG_HOME/hg/hgrc}}.
 +
|-
 +
| [https://www.mesa3d.org/ mesa]
 +
|
 +
| [https://cgit.freedesktop.org/mesa/mesa/commit/?id=87ab26b2ab35a29d446ae66f1795d40c184c0739 87ab26b2ab]
 +
|
 +
| {{ic|XDG_CACHE_HOME/mesa}}
 
|-
 
|-
 
| [http://milkytracker.org/ milkytracker]
 
| [http://milkytracker.org/ milkytracker]
Line 312: Line 361:
 
| [https://github.com/mypaint/mypaint/commit/cf723b74cd cf723b74cd]
 
| [https://github.com/mypaint/mypaint/commit/cf723b74cd cf723b74cd]
 
|
 
|
 +
|
 +
|-
 +
| [[nano]]
 +
| {{ic|~/.nano/}} {{ic|~/.nanorc}}
 +
| [http://git.savannah.gnu.org/cgit/nano.git/commit/?id=c16e79b612eb8e061a4bd0b5f187c37a036fc403 036fc403]
 +
| [https://savannah.gnu.org/patch/?8523]
 
|
 
|
 
|-
 
|-
Line 320: Line 375:
 
| {{ic|ncmpcpp_directory}} should be set to avoid an {{ic|error.log}} file in {{ic|~/.ncmpcpp}}.
 
| {{ic|ncmpcpp_directory}} should be set to avoid an {{ic|error.log}} file in {{ic|~/.ncmpcpp}}.
 
|-
 
|-
| [http://neovim.io/ neovim]
+
| [[neovim]]
 
| {{ic|~/.nvim}}
 
| {{ic|~/.nvim}}
  
Line 337: Line 392:
  
 
{{ic|1=$ mkdir -p "$XDG_DATA_HOME"/newsbeuter "$XDG_CONFIG_HOME"/newsbeuter}}
 
{{ic|1=$ mkdir -p "$XDG_DATA_HOME"/newsbeuter "$XDG_CONFIG_HOME"/newsbeuter}}
 +
|-
 +
| [[NVIDIA]]
 +
| {{ic|~/.nv}}
 +
|
 +
|
 +
|
 
|-
 
|-
 
| [[OfflineIMAP]]
 
| [[OfflineIMAP]]
Line 356: Line 417:
 
[https://github.com/PCSX2/pcsx2/commit/3b22f0fb0 3b22f0fb0] [https://github.com/PCSX2/pcsx2/commit/0a012aec2 0a012aec2]
 
[https://github.com/PCSX2/pcsx2/commit/3b22f0fb0 3b22f0fb0] [https://github.com/PCSX2/pcsx2/commit/0a012aec2 0a012aec2]
 
| [https://github.com/PCSX2/pcsx2/issues/352] [https://github.com/PCSX2/pcsx2/issues/381]
 
| [https://github.com/PCSX2/pcsx2/issues/352] [https://github.com/PCSX2/pcsx2/issues/381]
 +
|
 +
|-
 +
| [https://pip.pypa.io/ pip]
 +
| {{ic|~/.pip}}
 +
| [https://github.com/pypa/pip/blob/548a9136525815dff41acd845c558a0b36eb1c5f/NEWS.rst#60-2014-12-22 6.0]
 +
| [https://github.com/pypa/pip/issues/1733]
 
|
 
|
 
|-
 
|-
Line 380: Line 447:
 
| [https://projects.archlinux.org/pacman.git/commit/?id=80eca94c8 80eca94c8]
 
| [https://projects.archlinux.org/pacman.git/commit/?id=80eca94c8 80eca94c8]
 
| [https://mailman.archlinux.org/pipermail/pacman-dev/2014-July/019178.html]
 
| [https://mailman.archlinux.org/pipermail/pacman-dev/2014-July/019178.html]
 +
|
 +
|-
 +
| [https://github.com/panda3d/panda3d Panda3D]
 +
| {{ic|~/.panda3d}}
 +
| [https://github.com/panda3d/panda3d/commit/2b537d2 2b537d2]
 +
|
 
|
 
|
 
|-
 
|-
Line 411: Line 484:
 
| [https://github.com/qtile/qtile/pull/835]
 
| [https://github.com/qtile/qtile/pull/835]
 
| Some optional bar widgets can create files and directories in non-compliant paths, but most often these are still configurable.
 
| Some optional bar widgets can create files and directories in non-compliant paths, but most often these are still configurable.
 +
|-
 +
| {{Pkg|rclone}}
 +
| {{ic|~/.rclone.conf}}
 +
| [https://github.com/ncw/rclone/commit/9d362589 9d362589]
 +
| [https://github.com/ncw/rclone/issues/868]
 +
|
 
|-
 
|-
 
| [http://www.libretro.com/ retroarch]
 
| [http://www.libretro.com/ retroarch]
Line 423: Line 502:
 
| [https://github.com/mozilla/rr/issues/1455]
 
| [https://github.com/mozilla/rr/issues/1455]
 
|
 
|
 +
|-
 +
| [[rTorrent]]
 +
| {{ic|~/.rtorrent.rc}}
 +
| [https://github.com/rakshasa/rtorrent/commit/6a8d332b 6a8d332b]
 +
|
 +
|-
 +
| [https://www.skype.com/ Skype]
 +
| {{ic|~/.Skype}}
 +
| 8.0
 +
|
 +
|
 +
|-
 +
| [http://www.snes9x.com/ Snes9x]
 +
| {{ic|~/.snes9x}}
 +
| [https://github.com/snes9xgit/snes9x/commit/93b5f11641fa22d4518f251d6e3db99219864677 19864677]
 +
| [https://github.com/snes9xgit/snes9x/issues/194]
 +
| By default configuration is blank, is intended that the user fill it at they will (throw the gui or manually) before launch a rom
 +
|-
 +
| {{AUR|sublime-text-dev}}
 +
|
 +
|
 +
|
 +
| Cache is placed in {{ic|$XDG_CONFIG_HOME/sublime-text-3/Cache}} instead of expected {{ic|$XDG_CACHE_HOME/sublime-text-3}}.
 
|-
 
|-
 
| [[surfraw]]
 
| [[surfraw]]
Line 434: Line 536:
 
|
 
|
 
|-
 
|-
| [https://github.com/SirCmpwn/sway sway]
+
| [[sway]]
 
| {{ic|~/.sway/config}}
 
| {{ic|~/.sway/config}}
 
| [https://github.com/SirCmpwn/sway/commit/614393c09 614393c09]
 
| [https://github.com/SirCmpwn/sway/commit/614393c09 614393c09]
Line 450: Line 552:
 
|
 
|
 
|
 
|
 +
|
 +
|-
 +
| [https://github.com/tmuxinator/tmuxinator tmuxinator]
 +
| {{ic|~/.tmuxinator}}
 +
| [https://github.com/tmuxinator/tmuxinator/pull/511/commits/263692349f1142c0edcacfbefae541cbc0e7b44e 2636923]
 +
| [https://github.com/tmuxinator/tmuxinator/pull/511]
 
|
 
|
 
|-
 
|-
Line 480: Line 588:
 
| [https://www.virtualbox.org/ticket/5099?action=diff&version=7 4.3]
 
| [https://www.virtualbox.org/ticket/5099?action=diff&version=7 4.3]
 
| [https://www.virtualbox.org/ticket/5099]
 
| [https://www.virtualbox.org/ticket/5099]
 +
|
 +
|-
 +
| [http://martanne.github.io/vis/ vis]
 +
| {{ic|~/.vis}}
 +
| [https://github.com/martanne/vis/pull/303]
 +
| [https://github.com/martanne/vis/commit/68a25c751c0219ef5df589a19513e46a08965d5a 68a25c75]
 +
[https://github.com/martanne/vis/commit/d138908cf8149eb10120957271cd6979272b4730 d138908c]
 
|
 
|
 
|-
 
|-
Line 504: Line 619:
 
| [https://github.com/derat/xsettingsd/commit/b4999f5e9e99224caf97d09f25ee731774ecd7be 4ecd7be]
 
| [https://github.com/derat/xsettingsd/commit/b4999f5e9e99224caf97d09f25ee731774ecd7be 4ecd7be]
 
|
 
|
 +
|
 +
|-
 +
| [[xmonad]]
 +
| {{ic|~/.xmonad}}
 +
| [https://github.com/xmonad/xmonad/commit/40fc10b6a5682ce1d6ba7f0679962926ef6cfade 40fc10b6]
 +
| [https://github.com/xmonad/xmonad/issues/61] [https://code.google.com/p/xmonad/issues/detail?id=484]
 +
| Alternatively the environments {{ic|XMONAD_CONFIG_HOME}}, {{ic|XMONAD_DATA_HOME}}, and {{ic|XMONAD_CACHE_HOME}} are also available.
 +
|-
 +
| [http://www.vergenet.net/~conrad/software/xsel/ xsel]
 +
| {{ic|~/.xsel.log}}
 +
| [https://github.com/kfish/xsel/commit/ee7b48111be2e2117b201962e9d1c0e1f9804ed4 ee7b4811]
 +
| [https://github.com/kfish/xsel/issues/10]
 
|
 
|
 
|}
 
|}
Line 530: Line 657:
 
| {{ic|1=$ anki -b "$XDG_DATA_HOME"/Anki}}
 
| {{ic|1=$ anki -b "$XDG_DATA_HOME"/Anki}}
 
|-
 
|-
| [http://aspell.net/ aspell]
+
| [[aspell]]
 
| {{ic|~/.aspell.conf}}
 
| {{ic|~/.aspell.conf}}
 
|
 
|
 
|
 
|
|
+
| {{ic|1=$ export ASPELL_CONF="per-conf $XDG_CONFIG_HOME/aspell/aspell.conf; personal $XDG_CONFIG_HOME/aspell/en.pws; repl $XDG_CONFIG_HOME/aspell/en.prepl"}}
 
|-
 
|-
 
| [[Atom]]
 
| [[Atom]]
 
| {{ic|~/.atom}}
 
| {{ic|~/.atom}}
 
|
 
|
 +
| [https://github.com/atom/atom/issues/8281]
 +
| {{ic|1=$ export ATOM_HOME="$XDG_DATA_HOME"/atom}}
 +
|-
 +
| [[bazaar]]
 +
| {{ic|~/.bazaar}}
 +
 +
{{ic|~/.bzr.log}}
 +
| [https://bugs.launchpad.net/bzr/+bug/195397/comments/15 2.3.0]
 +
| [https://bugs.launchpad.net/bzr/+bug/195397]
 +
| Discussion in upstream bug states that bazaar wil use {{ic|~/.config/bazaar}} if it exists. The logfile {{ic|~/.bzr.log}} might still be written.
 
|
 
|
| {{ic|1=$ export ATOM_HOME="$XDG_DATA_HOME"/atom}}
+
|-
 +
| [[Ruby#Bundler]]
 +
| {{ic|~/.bundle}}
 +
|
 +
| [https://github.com/bundler/bundler/pull/6024] [https://github.com/bundler/bundler/issues/4333]
 +
| {{ic|1=$ export BUNDLE_USER_CONFIG="$XDG_CONFIG_HOME"/bundle BUNDLE_USER_CACHE="$XDG_CACHE_HOME"/bundle BUNDLE_USER_PLUGIN="$XDG_DATA_HOME"/bundle}}
 
|-
 
|-
 
| [http://crates.io/ cargo]
 
| [http://crates.io/ cargo]
 
| {{ic|~/.cargo}}
 
| {{ic|~/.cargo}}
 
|
 
|
| [https://github.com/rust-lang/cargo/pull/148] [https://github.com/rust-lang/cargo/issues/1734]
+
| [https://github.com/rust-lang/cargo/pull/148] [https://github.com/rust-lang/cargo/issues/1734] [https://github.com/rust-lang/rfcs/pull/1615]
 
| {{ic|1=$ export CARGO_HOME="$XDG_DATA_HOME"/cargo}}
 
| {{ic|1=$ export CARGO_HOME="$XDG_DATA_HOME"/cargo}}
 
|-
 
|-
Line 559: Line 701:
 
|
 
|
 
| {{ic|1=$ petite --eehistory "$XDG_DATA_HOME"/chezscheme/history}}
 
| {{ic|1=$ petite --eehistory "$XDG_DATA_HOME"/chezscheme/history}}
|-
 
| [[PHP#Composer|composer]]
 
| {{ic|~/.composer}}
 
|
 
|
 
| {{ic|1=$ export COMPOSER_HOME="$XDG_CONFIG_HOME"/composer
 
$ export COMPOSER_CACHE_DIR="$XDG_CACHE_HOME"/composer}}
 
 
|-
 
|-
 
| [[conky]]
 
| [[conky]]
Line 573: Line 708:
 
| {{ic|1=$ conky --config="$XDG_CONFIG_HOME"/conky/conkyrc}}
 
| {{ic|1=$ conky --config="$XDG_CONFIG_HOME"/conky/conkyrc}}
 
|-
 
|-
| [https://www.gnu.org/software/coreutils/ coreutils]
+
| [[coreutils]]
 
| {{ic|~/.dircolors}}
 
| {{ic|~/.dircolors}}
 
|
 
|
Line 583: Line 718:
 
|
 
|
 
|
 
|
| Trailing '/' is required:
+
| The trailing slash is required:
  
 
{{ic|1=$ export CRAWL_DIR="$XDG_DATA_HOME"/crawl/}}
 
{{ic|1=$ export CRAWL_DIR="$XDG_DATA_HOME"/crawl/}}
 
|-
 
|-
| [http://sourceforge.net/projects/dict/ dict]
+
| [[CUDA]]
 +
| {{ic|~/.nv}}
 +
|
 +
|
 +
| {{ic|1=$ export CUDA_CACHE_PATH="$XDG_CACHE_HOME"/nv}}
 +
|-
 +
| [[dict]]
 
| {{ic|~/.dictrc}}
 
| {{ic|~/.dictrc}}
 
|
 
|
Line 608: Line 749:
 
{{ic|~/.emscripten_cache__last_clear}}
 
{{ic|~/.emscripten_cache__last_clear}}
 
|
 
|
| [https://github.com/kripken/emscripten/issues/3624 3624]
+
| [https://github.com/kripken/emscripten/issues/3624]
 
| {{ic|1=$ export EM_CONFIG="$XDG_CONFIG_HOME"/emscripten/config}}
 
| {{ic|1=$ export EM_CONFIG="$XDG_CONFIG_HOME"/emscripten/config}}
  
Line 617: Line 758:
 
{{ic|1=$ emcc --em-config "$XDG_CONFIG_HOME"/emscripten/config \
 
{{ic|1=$ emcc --em-config "$XDG_CONFIG_HOME"/emscripten/config \
 
--em-cache "$XDG_CACHE_HOME"/emscripten/cache}}
 
--em-cache "$XDG_CACHE_HOME"/emscripten/cache}}
 +
|-
 +
| [https://www.freecadweb.org/ freecad]
 +
| {{ic|~/.FreeCAD}}
 +
|
 +
| [https://www.freecadweb.org/tracker/view.php?id=2956]
 +
| {{ic|1=$ freecad -u "$XDG_CONFIG_HOME"/FreeCAD/user.cfg -s "$XDG_CONFIG_HOME"/FreeCAD/system.cfg}}
 
|-
 
|-
 
| [http://www.gnu.org/software/gdb/ gdb]
 
| [http://www.gnu.org/software/gdb/ gdb]
Line 630: Line 777:
 
| {{ic|1=$ export GETIPLAYERUSERPREFS="$XDG_DATA_HOME"/get_iplayer}}
 
| {{ic|1=$ export GETIPLAYERUSERPREFS="$XDG_DATA_HOME"/get_iplayer}}
 
|-
 
|-
| [[GIMP]]
+
| [[getmail]]
| {{ic|~/.gimp-2.8}}
+
| {{ic|~/.getmail/getmailrc}}
{{ic|~/.thumbnails}}
+
|
| [https://git.gnome.org/browse/gimp/commit/?id=60e0cfe 60e0cfe]
+
|
| [https://bugzilla.gnome.org/show_bug.cgi?id=166643] [https://mail.gnome.org/archives/gimp-developer-list/2012-October/msg00028.html]
+
| {{ic|1=$ getmail --rcfile="$XDG_CONFIG_HOME/getmail/getmailrc" --getmaildir="$XDG_DATA_HOME/getmail"}}
| {{ic|1=$ export GIMP2_DIRECTORY="$XDG_CONFIG_HOME"/gimp}}
 
 
|-
 
|-
 
| [http://guichaz.free.fr/gliv/ gliv]
 
| [http://guichaz.free.fr/gliv/ gliv]
Line 643: Line 789:
 
| {{ic|1=$ gliv --glivrc="$XDG_CONFIG_HOME"/gliv/glivrc}}
 
| {{ic|1=$ gliv --glivrc="$XDG_CONFIG_HOME"/gliv/glivrc}}
 
|-
 
|-
| [[GPG|GnuPG]]
+
| [[GnuPG]]
 
| {{ic|~/.gnupg}}
 
| {{ic|~/.gnupg}}
 
|
 
|
Line 656: Line 802:
 
|
 
|
 
| Some paths can be changed with the {{ic|KMLPath}} and {{ic|CachePath}} options in {{ic|~/.config/Google/GoogleEarthPlus.conf}}
 
| Some paths can be changed with the {{ic|KMLPath}} and {{ic|CachePath}} options in {{ic|~/.config/Google/GoogleEarthPlus.conf}}
 +
|-
 +
| [https://sourceforge.net/projects/gqclient GQ LDAP client]
 +
| {{ic|~/.gq}}
 +
{{ic|~/.gq-state}}
 +
| [https://sourceforge.net/p/gqclient/mailman/message/2053978 1.51]
 +
|
 +
| {{ic|1=$ export GQRC="$XDG_CONFIG_HOME"/gqrc}}
 +
 +
{{ic|1=$ export GQSTATE="$XDG_DATA_HOME"/gq/gq-state}}
 +
 +
{{ic|1=$ mkdir -p "$(dirname "$GQSTATE")"}}
 +
|-
 +
| [https://gradle.org/ gradle]
 +
| {{ic|~/.gradle}}
 +
|
 +
| [https://discuss.gradle.org/t/be-a-nice-freedesktop-citizen-move-the-gradle-to-the-appropriate-location-in-linux/2199]
 +
| {{ic|1=$ export GRADLE_USER_HOME="$XDG_DATA_HOME"/gradle}}
 
|-
 
|-
 
| [[gtk]]
 
| [[gtk]]
Line 675: Line 838:
 
| {{ic|1=$ export HTTPIE_CONFIG_DIR="$XDG_CONFIG_HOME"/httpie}}
 
| {{ic|1=$ export HTTPIE_CONFIG_DIR="$XDG_CONFIG_HOME"/httpie}}
 
|-
 
|-
| [http://ipython.org ipython]/[http://jupyter.org jupyter]
+
| [http://ipython.org ipython]/[[jupyter]]
 
| {{ic|~/.ipython}}
 
| {{ic|~/.ipython}}
 
|
 
|
Line 690: Line 853:
 
--home="$XDG_DATA_HOME"/irssi}}
 
--home="$XDG_DATA_HOME"/irssi}}
 
|-
 
|-
| [http://isync.sourceforge.net isync]
+
| [[isync]]
 
| {{ic|~/.mbsyncrc}}
 
| {{ic|~/.mbsyncrc}}
 
|
 
|
Line 696: Line 859:
 
| {{ic|1=$ mbsync -c "$XDG_CONFIG_HOME"/isync/mbsyncrc}}
 
| {{ic|1=$ mbsync -c "$XDG_CONFIG_HOME"/isync/mbsyncrc}}
 
|-
 
|-
| [http://www.greenwoodsoftware.com/less/ less]
+
| [[Java]] (OpenJDK)
 +
| {{ic|~/.java/.userPrefs}}
 +
|
 +
|
 +
| {{ic|1=$ export _JAVA_OPTIONS=-Djava.util.prefs.userRoot="$XDG_CONFIG_HOME"/java}}
 +
|-
 +
| [[core utilities#less|less]]
 
| {{ic|~/.lesshst}}
 
| {{ic|~/.lesshst}}
 
|
 
|
Line 719: Line 888:
 
| [https://bugs.freedesktop.org/show_bug.cgi?id=49173]
 
| [https://bugs.freedesktop.org/show_bug.cgi?id=49173]
 
| {{ic|1=$ export ICEAUTHORITY="$XDG_RUNTIME_DIR"/ICEauthority}}
 
| {{ic|1=$ export ICEAUTHORITY="$XDG_RUNTIME_DIR"/ICEauthority}}
 +
Be wary setting this too restrictively, e.g. {{pkg|gdm}} needs access to a user's {{ic|ICEauthority}} file.
 
|-
 
|-
| [http://www.x.org/wiki/ libx11]
+
| [[Xorg|libx11]]
 
| {{ic|~/.XCompose}}
 
| {{ic|~/.XCompose}}
 
|
 
|
Line 732: Line 902:
 
| {{ic|1=$ ltrace -F "$XDG_CONFIG_HOME"/ltrace/ltrace.conf}}
 
| {{ic|1=$ ltrace -F "$XDG_CONFIG_HOME"/ltrace/ltrace.conf}}
 
|-
 
|-
| [http://www.wolfram.com/mathematica/ Mathematica]
+
| {{pkg|maven}}
 +
| {{ic|~/.m2}}
 +
|
 +
|
 +
| {{ic|1=$ mvn -gs "$XDG_CONFIG_HOME"/maven/settings.xml}}
 +
{{hc|[http://maven.apache.org/settings.html settings.xml]|<nowiki><settings xmlns="http://maven.apache.org/SETTINGS/1.0.0"
 +
  xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
 +
  xsi:schemaLocation="http://maven.apache.org/SETTINGS/1.0.0
 +
                      https://maven.apache.org/xsd/settings-1.0.0.xsd">
 +
  ...
 +
  <localRepository>${env.XDG_CACHE_HOME}/maven/repository</localRepository>
 +
  ...
 +
</settings></nowiki>}}
 +
|-
 +
| [[Mathematica]]
 
| {{ic|~/.Mathematica}}
 
| {{ic|~/.Mathematica}}
 
|
 
|
Line 751: Line 935:
  
 
{{ic|1=$ mocp -O MOCDir="$XDG_CONFIG_HOME"/moc}}
 
{{ic|1=$ mocp -O MOCDir="$XDG_CONFIG_HOME"/moc}}
 +
|-
 +
| [https://www.jedsoft.org/most/ most]
 +
| {{ic|~/.mostrc}}
 +
|
 +
|
 +
| {{ic|1=$ export MOST_INITFILE="$XDG_CONFIG_HOME"/mostrc}}
 
|-
 
|-
 
| [[MPlayer]]
 
| [[MPlayer]]
Line 757: Line 947:
 
|
 
|
 
| {{ic|1=$ export MPLAYER_HOME="$XDG_CONFIG_HOME"/mplayer}}
 
| {{ic|1=$ export MPLAYER_HOME="$XDG_CONFIG_HOME"/mplayer}}
 +
|-
 +
| [[msmtp]]
 +
| {{ic|~/.msmtprc}}
 +
|
 +
|
 +
| {{ic|1=$ msmtp -C "$XDG_CONFIG_HOME"/msmtp/msmtprc}}
 +
|-
 +
| [[MySQL]]
 +
| {{ic|~/.mysql_history}}
 +
|
 +
|
 +
| {{ic|1=$ export MYSQL_HISTFILE="$XDG_DATA_HOME"/mysql_history}}
 
|-
 
|-
 
| {{pkg|ncurses}}
 
| {{pkg|ncurses}}
Line 767: Line 969:
  
 
{{ic|1=$ export TERMINFO_DIRS="$XDG_DATA_HOME"/terminfo:/usr/share/terminfo}}
 
{{ic|1=$ export TERMINFO_DIRS="$XDG_DATA_HOME"/terminfo:/usr/share/terminfo}}
 +
|-
 +
| [http://www.musicpd.org/clients/ncmpc/ ncmpc]
 +
| {{ic|~/.ncmpc}}
 +
|
 +
|
 +
| {{ic|ncmpc -f "$XDG_CONFIG_HOME"/ncmpc/config}}
 +
|-
 +
| [[Netbeans]]
 +
| {{ic|~/.netbeans}}
 +
|
 +
| [https://netbeans.org/bugzilla/show_bug.cgi?id=215961]
 +
| {{ic|1=$ netbeans --userdir "${XDG_CONFIG_HOME}"/netbeans}}
 +
|-
 +
| [[Node.js]]
 +
| {{ic|~/.node_repl_history}}
 +
|
 +
|
 +
| {{ic|1=$ export NODE_REPL_HISTORY="$XDG_DATA_HOME"/node_repl_history}} [https://nodejs.org/api/repl.html#repl_environment_variable_options]
 
|-
 
|-
 
| [[notmuch]]
 
| [[notmuch]]
Line 783: Line 1,003:
 
| [https://github.com/npm/npm/issues/6675]
 
| [https://github.com/npm/npm/issues/6675]
 
| {{ic|1=$ export NPM_CONFIG_USERCONFIG=$XDG_CONFIG_HOME/npm/npmrc}}
 
| {{ic|1=$ export NPM_CONFIG_USERCONFIG=$XDG_CONFIG_HOME/npm/npmrc}}
{{hc|npmrc|<nowiki>cache=$XDG_CACHE_HOME/npm
+
{{hc|npmrc|<nowiki>
prefix=$XDG_DATA_HOME/npm</nowiki>}}
+
prefix=${XDG_DATA_HOME}/npm
 +
cache=${XDG_CACHE_HOME}/npm
 +
tmp=${XDG_RUNTIME_DIR}/npm
 +
init-module=${XDG_CONFIG_HOME}/npm/config/npm-init.js
 +
</nowiki>}}
 +
{{ic|prefix}} is unnecessary (and unsupported) if Node.js is installed by {{AUR|nvm}}.
 +
|-
 +
| [https://github.com/NVIDIA/nvidia-settings nvidia-settings]
 +
| {{ic|~/.nvidia-settings-rc}}
 +
|
 +
|
 +
| {{ic|1=$ nvidia-settings --config="$XDG_CONFIG_HOME"/nvidia/settings}}
 
|-
 
|-
| [[NVIDIA]], [[CUDA]]
+
| {{AUR|nvm}}
| {{ic|~/.nv}}
+
| {{ic|~/.nvm}}
 
|
 
|
 
|
 
|
| {{ic|1=$ export __GL_SHADER_DISK_CACHE_PATH="$XDG_CACHE_HOME"/nv}}
+
| {{ic|1=$ export NVM_DIR="$XDG_DATA_HOME"/nvm}}
 +
|-
 +
| [[Octave]]
 +
| {{ic|~/octave}}
 +
 
 +
{{ic|~/.octave_packages}}
  
{{ic|1=$ export CUDA_CACHE_PATH="$XDG_CACHE_HOME"/nv}}
+
{{ic|~/.octave_hist}}
|-
 
| [https://github.com/NVIDIA/nvidia-settings nvidia-settings]
 
| {{ic|~/.nvidia-settings-rc}}
 
 
|
 
|
 
|
 
|
| {{ic|1=$ nvidia-settings --config="$XDG_CONFIG_HOME"/nvidia/settings}}
+
| {{ic|1=$ export OCTAVE_HISTFILE="$XDG_CACHE_HOME/octave-hsts"}}
 +
 
 +
{{ic|1=$ export OCTAVE_SITE_INITFILE="$XDG_CONFIG_HOME/octave/octaverc"}}
 +
 
 +
{{hc|$XDG_CONFIG_HOME/octave/octaverc|<nowiki>
 +
source /usr/share/octave/site/m/startup/octaverc;
 +
pkg prefix ~/.local/share/octave/packages ~/.local/share/octave/packages;
 +
pkg local_list /home/<your username>/.local/share/octave/octave_packages;
 +
</nowiki>}}
 +
The {{ic|local_list}} option must be given an absolute path.
 
|-
 
|-
 
| [http://www.openscad.org/ openscad]
 
| [http://www.openscad.org/ openscad]
Line 808: Line 1,050:
 
Currently it [https://github.com/openscad/openscad/blob/master/src/PlatformUtils-posix.cc#L20 hard-codes] {{ic|~/.local/share}}.
 
Currently it [https://github.com/openscad/openscad/blob/master/src/PlatformUtils-posix.cc#L20 hard-codes] {{ic|~/.local/share}}.
 
|-
 
|-
| [https://www.openssl.org/docs/faq.html OpenSSL]
+
| [[OpenSSL]]
 
| {{ic|~/.rnd}}
 
| {{ic|~/.rnd}}
 
|
 
|
Line 814: Line 1,056:
 
| Seeding file .rnd's location can be set with RANDFILE environment variable per [https://www.openssl.org/docs/faq.html FAQ].
 
| Seeding file .rnd's location can be set with RANDFILE environment variable per [https://www.openssl.org/docs/faq.html FAQ].
 
|-
 
|-
| {{pkg|pass}}
+
| [[Pass]]
 
| {{ic|~/.password-store}}
 
| {{ic|~/.password-store}}
 
|
 
|
Line 820: Line 1,062:
 
| {{ic|1=$ export PASSWORD_STORE_DIR="$XDG_DATA_HOME"/pass}}
 
| {{ic|1=$ export PASSWORD_STORE_DIR="$XDG_DATA_HOME"/pass}}
 
|-
 
|-
| {{pkg|pidgin}}
+
| [[Pidgin]]
 
| {{ic|~/.purple}}
 
| {{ic|~/.purple}}
 
|
 
|
|
+
| [https://developer.pidgin.im/ticket/4911]
 
| {{ic|1=$ pidgin --config="$XDG_DATA_HOME"/purple}}
 
| {{ic|1=$ pidgin --config="$XDG_DATA_HOME"/purple}}
 +
|-
 +
| [https://www.postgresql.org/ postgresql]
 +
| {{ic|~/.psqlrc}}
 +
{{ic|~/.psql_history}}
 +
 +
{{ic|~/.pgpass}}
 +
 +
{{ic|~/.pg_service.conf}}
 +
| 9.2
 +
| [https://www.postgresql.org/docs/current/static/app-psql.html]
 +
 +
[https://www.postgresql.org/docs/current/static/libpq-envars.html]
 +
| {{ic|1=$ export PSQLRC="$XDG_CONFIG_HOME/pg/psqlrc"}}
 +
{{ic|1=$ export PSQL_HISTORY="$XDG_CACHE_HOME/pg/psql_history"}}
 +
 +
{{ic|1=$ export PGPASSFILE="$XDG_CONFIG_HOME/pg/pgpass"}}
 +
 +
{{ic|1=$ export PGSERVICEFILE="$XDG_CONFIG_HOME/pg/pg_service.conf"}}
 +
 +
It is required to create both directories {{ic|1=$ mkdir "$XDG_CONFIG_HOME/pg" && mkdir "$XDG_CACHE_HOME/pg"}}
 
|-
 
|-
 
| [[PulseAudio]]
 
| [[PulseAudio]]
Line 831: Line 1,093:
 
|
 
|
 
| Very likely generated by the {{ic|module-esound-protocol-unix.so}} module.  It can be configured to use a different location but it makes much more sense to just comment out this module in {{ic|/etc/pulse/default.pa}} or {{ic|"$XDG_CONFIG_HOME"/pulse/default.pa}}.
 
| Very likely generated by the {{ic|module-esound-protocol-unix.so}} module.  It can be configured to use a different location but it makes much more sense to just comment out this module in {{ic|/etc/pulse/default.pa}} or {{ic|"$XDG_CONFIG_HOME"/pulse/default.pa}}.
 +
|-
 +
| [https://www.pylint.org/ pylint]
 +
| {{ic|~/.pylint.d}}
 +
|
 +
| [https://github.com/PyCQA/pylint/issues/1364]<sup>won't
 +
| {{ic|1=$ export PYLINTHOME="$XDG_CACHE_HOME"/pylint}}
 
|-
 
|-
 
| [https://pypi.python.org/pypi/setuptools python-setuptools]
 
| [https://pypi.python.org/pypi/setuptools python-setuptools]
Line 838: Line 1,106:
 
| {{ic|1=$ export PYTHON_EGG_CACHE="$XDG_CACHE_HOME"/python-eggs}}
 
| {{ic|1=$ export PYTHON_EGG_CACHE="$XDG_CACHE_HOME"/python-eggs}}
 
|-
 
|-
| {{Pkg|rclone}}
+
| [[readline]]
| {{ic|~/.rclone.conf}}
 
|
 
|
 
| {{ic|1=$ rclone --config="$XDG_CONFIG_HOME"/rclone/rclone.conf}}
 
|-
 
| [http://cnswww.cns.cwru.edu/php/chet/readline/rltop.html readline]
 
 
| {{ic|~/.inputrc}}
 
| {{ic|~/.inputrc}}
 
|
 
|
Line 855: Line 1,117:
 
| [https://github.com/hanslub42/rlwrap/issues/25]
 
| [https://github.com/hanslub42/rlwrap/issues/25]
 
| {{ic|1=$ export RLWRAP_HOME="$XDG_DATA_HOME"/rlwrap}}
 
| {{ic|1=$ export RLWRAP_HOME="$XDG_DATA_HOME"/rlwrap}}
 +
|-
 +
| [https://rubygems.org/ RubyGems]
 +
| {{ic|~/.gem}}
 +
|
 +
|
 +
| {{ic|1=$ export GEM_HOME="$XDG_DATA_HOME"/gem}}
 +
{{ic|1=$ export GEM_SPEC_CACHE="$XDG_CACHE_HOME"/gem}}
 +
|-
 +
| [https://www.rustup.rs/ rustup]
 +
| {{ic|~/.rustup}}
 +
|
 +
| [https://github.com/rust-lang-nursery/rustup.rs/issues/247]
 +
| {{ic|1=$ export RUSTUP_HOME="$XDG_DATA_HOME"/rustup}}
 +
|-
 +
| [http://www.scala-sbt.org/ sbt]
 +
| {{ic|~/.sbt}}
 +
{{ic|~/.ivy2}}
 +
|
 +
| [https://github.com/sbt/sbt/issues/3681]
 +
| {{ic|1=$ sbt -ivy "$XDG_DATA_HOME"/ivy2 -sbt-dir "$XDG_DATA_HOME"/sbt}} (beware [https://github.com/sbt/sbt/issues/3598])
 
|-
 
|-
 
| [[screen]]
 
| [[screen]]
Line 889: Line 1,171:
 
|
 
|
 
| {{ic|1=$ export TIGRC_USER="$XDG_CONFIG_HOME"/tig/tigrc}}
 
| {{ic|1=$ export TIGRC_USER="$XDG_CONFIG_HOME"/tig/tigrc}}
 +
|-
 +
| [http://tiptop.gforge.inria.fr/ tiptop]
 +
| {{ic|~/.tiptoprc}}
 +
|
 +
|
 +
| This will still expect the {{ic|.tiptoprc}} file.
 +
{{ic|$ tiptop -W "$XDG_CONFIG_HOME"/tiptop}}
 
|-
 
|-
 
| [[tmux]]
 
| [[tmux]]
 
| {{ic|~/.tmux.conf}}
 
| {{ic|~/.tmux.conf}}
 
|
 
|
| [http://comments.gmane.org/gmane.comp.terminal-emulators.tmux.user/6013] [http://sourceforge.net/p/tmux/mailman/message/30619546/]
+
| [http://comments.gmane.org/gmane.comp.terminal-emulators.tmux.user/6013]{{Dead link|2017|12|29}} [http://sourceforge.net/p/tmux/mailman/message/30619546/]{{Dead link|2017|12|29}}
 
| {{ic|1=$ tmux -f "$XDG_CONFIG_HOME"/tmux/tmux.conf}}
 
| {{ic|1=$ tmux -f "$XDG_CONFIG_HOME"/tmux/tmux.conf}}
  
Line 928: Line 1,217:
 
|
 
|
 
|
 
|
| {{ic|1=$ export WGETRC="$XDG_CONFIG_HOME/wgetrc"}}
+
|  
 +
{{ic|1=$ export WGETRC="$XDG_CONFIG_HOME/wgetrc"}}
 +
{{ic|1=$ wget --hsts-file="$XDG_CACHE_HOME/wget-hsts"}}
 
|-
 
|-
 
| [[wine]]
 
| [[wine]]
Line 934: Line 1,225:
 
|
 
|
 
| [https://bugs.winehq.org/show_bug.cgi?id=20888]
 
| [https://bugs.winehq.org/show_bug.cgi?id=20888]
| [[Wine#Winetricks | Winetricks]] uses XDG-alike location below for [[Wine#WINEPREFIX | WINEPREFIX]] management:
+
| [[Wine#Winetricks|Winetricks]] uses XDG-alike location below for [[Wine#WINEPREFIX|WINEPREFIX]] management:
 
{{ic|1=$ mkdir -p "$XDG_DATA_HOME"/wineprefixes}}
 
{{ic|1=$ mkdir -p "$XDG_DATA_HOME"/wineprefixes}}
  
Line 947: Line 1,238:
 
| {{pkg|xorg-xinit}}
 
| {{pkg|xorg-xinit}}
 
| {{ic|~/.xinitrc}}
 
| {{ic|~/.xinitrc}}
 +
 +
{{ic|~/.xserverrc}}
 
|
 
|
 
|
 
|
 
| {{ic|1=$ export XINITRC="$XDG_CONFIG_HOME"/X11/xinitrc}}
 
| {{ic|1=$ export XINITRC="$XDG_CONFIG_HOME"/X11/xinitrc}}
 +
{{ic|1=$ export XSERVERRC="$XDG_CONFIG_HOME"/X11/xserverrc}}
 +
 +
Note that these variables are respected by ''xinit'', but not by ''startx''. Instead, specify the filename as an argument:
 +
 +
{{ic|1=$ startx "$XDG_CONFIG_HOME/X11/xinitrc" -- vt1}}
 
|-
 
|-
 
| {{pkg|xorg-xrdb}}
 
| {{pkg|xorg-xrdb}}
Line 958: Line 1,256:
 
|
 
|
 
| Ultimately you [http://superuser.com/questions/243914/xresources-or-xdefaults should be] using {{ic|Xresources}} and since these resources are loaded via {{ic|xrdb}} you can specify a path such as {{ic|1=$ xrdb -load ~/.config/X11/xresources}}.
 
| Ultimately you [http://superuser.com/questions/243914/xresources-or-xdefaults should be] using {{ic|Xresources}} and since these resources are loaded via {{ic|xrdb}} you can specify a path such as {{ic|1=$ xrdb -load ~/.config/X11/xresources}}.
|-
 
| [http://www.vergenet.net/~conrad/software/xsel/ xsel]
 
| {{ic|~/.xsel.log}}
 
|
 
| [https://github.com/kfish/xsel/issues/10]
 
| {{ic|1=$ xsel --logfile "$XDG_CACHE_HOME"/xsel/xsel.log}}
 
 
|}
 
|}
  
Line 973: Line 1,265:
 
! Discussion
 
! Discussion
 
! Notes
 
! Notes
 +
|-
 +
| [[adb]]
 +
| {{ic|~/.android}}
 +
| [https://developer.android.com/studio/command-line/variables.html#android_sdk_root]
 +
| {{ic|1=$ export ANDROID_SDK_HOME="$XDG_CONFIG_HOME"/android}}
 
|-
 
|-
 
| [[AMule]]
 
| [[AMule]]
 
| {{ic|~/.aMule}}
 
| {{ic|~/.aMule}}
 
|
 
|
 +
|
 +
|-
 +
| [https://developer.android.com/studio/index.html Android Studio]
 +
| {{ic|~/.AndroidStudio2.3}}
 +
 +
{{ic|~/.android}}
 +
 +
{{ic|~/.java}}
 +
|
 +
|
 +
|-
 +
| [https://osdn.net/projects/anthy/ anthy]
 +
| {{ic|~/.anthy}}
 +
| [https://osdn.net/ticket/browse.php?group_id=14&tid=28397]
 
|
 
|
 
|-
 
|-
 
| [https://directory.apache.org/studio/ Apache Directory Studio]
 
| [https://directory.apache.org/studio/ Apache Directory Studio]
 
| {{ic|~/.ApacheDirectoryStudio}}
 
| {{ic|~/.ApacheDirectoryStudio}}
 +
|
 +
|-
 +
| [[Arduino]]
 +
| {{ic|~/.arduino15}}
 +
{{ic|~/.jssc}}
 +
| [https://github.com/arduino/Arduino/issues/3915]<sup>won't
 +
|
 +
|-
 +
| [https://christian.amsuess.com/tools/arandr/ ARandR]
 +
| {{ic|~/.screenlayout}}
 +
|
 +
|
 +
|-
 +
| [https://www.audacityteam.org/ Audacity]
 +
| {{ic|~/.audacity-data}}
 +
|
 +
|
 +
|-
 +
| [http://fixounet.free.fr/avidemux/ Avidemux]
 +
| {{ic|~/.avidemux6}}
 
|
 
|
 
|
 
|
Line 994: Line 1,325:
  
 
{{ic|~/.bash_logout}}
 
{{ic|~/.bash_logout}}
| [http://savannah.gnu.org/support/?108134]
+
| [http://savannah.gnu.org/support/?108134]<sup>won't
| A specified {{ic|bashrc}} can be sourced from {{ic|/etc/bashrc}}
+
| {{ic|1=$ export HISTFILE="$XDG_DATA_HOME"/bash/history}}
{{ic|1=$ export HISTFILE="$XDG_DATA_HOME"/bash/history}}
+
A specified {{ic|bashrc}} can be sourced from {{ic|/etc/bashrc}}.
 +
 
 +
Specify {{ic|--init-file <file>}} as an alternative to {{ic|~/.bashrc}} for interactive shells.
 
|-
 
|-
 
| [https://www.haskell.org/cabal/ cabal]
 
| [https://www.haskell.org/cabal/ cabal]
Line 1,002: Line 1,335:
 
| [https://github.com/haskell/cabal/issues/680]
 
| [https://github.com/haskell/cabal/issues/680]
 
| See discussion for potential workarounds.  It is not very easy or straightforward but may be possible to emulate Base Directory compliance.
 
| See discussion for potential workarounds.  It is not very easy or straightforward but may be possible to emulate Base Directory compliance.
 +
|-
 +
| [https://calibre-ebook.com/ calibre]
 +
| {{ic|~/Calibre Library}}
 +
|
 +
|
 
|-
 
|-
 
| [[CUPS]]
 
| [[CUPS]]
 
| {{ic|~/.cups}}
 
| {{ic|~/.cups}}
| [http://www.cups.org/str.php?L4243]
+
| [http://www.cups.org/str.php?L4243]<sup>won't
 +
|
 +
|-
 +
| [[darcs]]
 +
| {{ic|~/.darcs}}
 +
| [http://bugs.darcs.net/issue2453]
 
|
 
|
 
|-
 
|-
Line 1,012: Line 1,355:
 
| [https://bugs.freedesktop.org/show_bug.cgi?id=35887]
 
| [https://bugs.freedesktop.org/show_bug.cgi?id=35887]
 
| This should be avoidable with kdbus [citation needed].
 
| This should be avoidable with kdbus [citation needed].
 +
|-
 +
| [https://wiki.gnome.org/Apps/Dia Dia]
 +
| {{ic|~/.dia}}
 +
|
 
|-
 
|-
 
| [[eclipse]]
 
| [[eclipse]]
Line 1,033: Line 1,380:
 
| {{ic|~/.mozilla}}
 
| {{ic|~/.mozilla}}
 
| [https://bugzil.la/259356]
 
| [https://bugzil.la/259356]
 +
|
 +
|-
 +
| [[Flatpak]]
 +
| {{ic|~/.var/}}
 +
| [https://github.com/flatpak/flatpak/issues/46] [https://github.com/flatpak/flatpak.github.io/issues/191]
 +
|
 +
|-
 +
| [https://www.haskell.org/ghc/ GHC]
 +
| {{ic|~/.ghc}}
 +
| [https://ghc.haskell.org/trac/ghc/ticket/6077]
 
|
 
|
 
|-
 
|-
 
| [http://www.gnu.org/software/parallel/ GNU parallel]
 
| [http://www.gnu.org/software/parallel/ GNU parallel]
 
| {{ic|~/.parallel}}
 
| {{ic|~/.parallel}}
 +
|
 +
|
 +
|-
 +
| [http://recordmydesktop.sourceforge.net/about.php gtk-recordMyDesktop]
 +
| {{ic|~/.gtk-recordmydesktop}}
 
|
 
|
 
|
 
|
Line 1,043: Line 1,405:
 
| {{ic|~/.idris}}
 
| {{ic|~/.idris}}
 
| [https://github.com/idris-lang/Idris-dev/pull/3456]
 
| [https://github.com/idris-lang/Idris-dev/pull/3456]
 +
|
 +
|-
 +
| [[Java]] (OpenJDK)
 +
| {{ic|~/.java/fonts}}, {{ic|~/.java/webview}}<sup>JavaFX
 +
| [https://bugzilla.redhat.com/show_bug.cgi?id=1154277]<sup>RedHat
 
|
 
|
 
|-
 
|-
Line 1,052: Line 1,419:
 
|
 
|
 
|-
 
|-
| [https://fedorahosted.org/linux-pam/ Linux PAM]
+
| [http://www.linux-pam.org/ Linux PAM]
 
| {{ic|~/.pam_environment}}
 
| {{ic|~/.pam_environment}}
|
+
| [https://github.com/linux-pam/linux-pam/issues/7]
 
| Hardcoded in [https://github.com/linux-pam/linux-pam/blob/master/modules/pam_env/pam_env.c modules/pam_env/pam_env.c]
 
| Hardcoded in [https://github.com/linux-pam/linux-pam/blob/master/modules/pam_env/pam_env.c modules/pam_env/pam_env.c]
 
|-
 
|-
Line 1,070: Line 1,437:
 
|
 
|
 
| History can be moved by using {{ic|rlwrap mathomatic -r}} with the {{ic|RLWRAP_HOME}} environment set appropriately.
 
| History can be moved by using {{ic|rlwrap mathomatic -r}} with the {{ic|RLWRAP_HOME}} environment set appropriately.
|-
 
| [[Mercurial]]
 
| {{ic|~/.hgrc}}
 
|
 
| You cannot append to the configuration search paths, just overwrite them completely. That means you need to be careful to add all default folders:
 
 
{{ic|1=$ export HGRCPATH=/usr/lib/python2.7/site-packages/mercurial/default.d/:\
 
/etc/mercurial/hgrc:"${XDG_CONFIG_HOME}"/mercurial/hgrc}}
 
 
To find the default configuration paths:
 
 
{{ic|1=$ env -u HGRCPATH hg debugconfig --debug {{!}} grep "read config"}}
 
 
|-
 
|-
 
| [http://www.milkytracker.org/ milkytracker]
 
| [http://www.milkytracker.org/ milkytracker]
 
| {{ic|~/.milkytracker_config}}
 
| {{ic|~/.milkytracker_config}}
 
| [https://github.com/Deltafire/MilkyTracker/issues/12]
 
| [https://github.com/Deltafire/MilkyTracker/issues/12]
 +
|
 +
|-
 +
| [https://minecraft.net/ Minecraft]
 +
| {{ic|~/.minecraft}}
 +
| [https://bugs.mojang.com/browse/MCL-2563]
 
|
 
|
 
|-
 
|-
Line 1,093: Line 1,453:
 
{{ic|~/.dbshell}}
 
{{ic|~/.dbshell}}
 
| [https://jira.mongodb.org/browse/DOCS-5652?jql=text%20~%20%22.mongorc.js%22]
 
| [https://jira.mongodb.org/browse/DOCS-5652?jql=text%20~%20%22.mongorc.js%22]
| [http://stackoverflow.com/a/22349050/4200039 This Stack Overflow] thread suggests a partial workaround using command-line switch {{ic|--norc}}.
+
| [http://stackoverflow.com/a/22349050/4200039 This Stack Overflow thread] suggests a partial workaround using command-line switch {{ic|--norc}}.
|-
 
| [http://www.musicpd.org/clients/ncmpc/ ncmpc]
 
| {{ic|~/.ncmpc}}
 
|
 
|
 
 
|-
 
|-
 
|
 
|
Line 1,123: Line 1,478:
 
| {{ic|~/.debug}}
 
| {{ic|~/.debug}}
 
|
 
|
| Hardcoded in [https://github.com/torvalds/linux/blob/master/tools/perf/util/config.c#L18 tools/perf/util/config.c:18].
+
| Hardcoded in [https://github.com/torvalds/linux/blob/master/tools/perf/util/config.c#L29 tools/perf/util/config.c:29].
 
|-
 
|-
 +
| various [[shell]]s and [[display manager]]s
 +
| {{ic|~/.profile}}
 
|
 
|
| {{ic|~/.profile}}
 
 
|
 
|
| Used by the various [[shell]]s and [[display manager]]s.
 
 
|-
 
|-
 
| [[python]]
 
| [[python]]
Line 1,135: Line 1,490:
 
| All history from interactive sessions is saved to {{ic|~/.python_history}} by default since [https://bugs.python.org/issue5845 version 3.4], custom path can still be set the same way as in older versions (see [https://docs.python.org/3/library/readline.html?highlight=readline#example this example]).
 
| All history from interactive sessions is saved to {{ic|~/.python_history}} by default since [https://bugs.python.org/issue5845 version 3.4], custom path can still be set the same way as in older versions (see [https://docs.python.org/3/library/readline.html?highlight=readline#example this example]).
 
|-
 
|-
| [http://racket-lang.org/ racket]
+
| [https://doc.qt.io/qt-5/qtdesigner-manual.html Qt Designer]
 +
| {{ic|~/.designer}}
 +
|
 +
|
 +
|-
 +
| [https://quodlibet.readthedocs.io/en/latest/ Quod Libet]
 +
| {{ic|~/.quodlibet}}
 +
| [https://github.com/quodlibet/quodlibet/issues/138]
 +
|
 +
|-
 +
| [https://racket-lang.org/ racket]
 
| {{ic|~/.racketrc}}
 
| {{ic|~/.racketrc}}
 
|
 
|
 +
|
 +
|-
 +
| [http://rednotebook.sourceforge.net/ RedNotebook]
 +
| {{ic|~/.rednotebook}}
 +
|
 +
|
 +
|-
 +
| [https://remarkableapp.github.io/linux.html Remarkable]
 +
| {{ic|~/.remarkable}}
 +
|
 +
|
 +
|-
 +
| [https://www.renpy.org/ Ren'Py]
 +
| {{ic|~/.renpy}}
 +
| [https://github.com/renpy/renpy/issues/1377]
 +
|
 +
|-
 +
| [https://www.scribus.net/ Scribus]
 +
| {{ic|~/.scribus}}
 
|
 
|
 
|-
 
|-
Line 1,143: Line 1,527:
 
| {{ic|~/.mozilla}}
 
| {{ic|~/.mozilla}}
 
| [https://bugzil.la/726939]
 
| [https://bugzil.la/726939]
|
 
|-
 
| [[Skype]]
 
| {{ic|~/.Skype}}
 
| [https://community.skype.com/t5/Linux-archive/Skype-violates-XDG-basedir-spec-on-linux/td-p/4175884]
 
 
|
 
|
 
|-
 
|-
Line 1,171: Line 1,550:
 
| [[SQLite]]
 
| [[SQLite]]
 
| {{ic|~/.sqlite_history}}
 
| {{ic|~/.sqlite_history}}
| [http://unix.stackexchange.com/questions/306890/change-location-of-sqlite-history-file][http://sqlite.1065341.n5.nabble.com/Customizing-the-location-of-the-sqlite-history-td87055.html]
+
 
 +
{{ic|~/.sqliterc}}
 +
| [https://unix.stackexchange.com/questions/306890/change-location-of-sqlite-history-file][http://sqlite.1065341.n5.nabble.com/Customizing-the-location-of-the-sqlite-history-td87055.html]
 +
| {{ic|$ sqlite3 -init "$XDG_CONFIG_HOME"/sqlite3/sqliterc}}
 +
|-
 +
| [[Steam]]
 +
| {{ic|~/.steam}}
 +
{{ic|~/.steampath}}
 +
{{ic|~/.steampid}}
 +
| [https://github.com/ValveSoftware/steam-for-linux/issues/1890]
 +
| Many game engines (Unity 3D, Unreal) follow the specification, but then individual game publishers hardcode the paths in [https://www.ctrl.blog/entry/flatpak-steamcloud-xdg Steam Auto-Cloud] causing game-saves to sync to the wrong directory.
 +
|-
 +
| [[TeamSpeak]]
 +
| {{ic|~/.ts3client}}
 +
|
 +
|-
 +
| [http://www.texmacs.org/ TeXmacs]
 +
| {{ic|~/.TeXmacs}}
 +
|
 
|
 
|
 
|-
 
|-
Line 1,177: Line 1,574:
 
| {{ic|~/.thunderbird}}
 
| {{ic|~/.thunderbird}}
 
| [https://bugzil.la/735285]
 
| [https://bugzil.la/735285]
 +
|
 +
|-
 +
| [https://git.archlinux.org/users/remy/texlive-localmanager.git/ tllocalmgr]
 +
| {{ic|~/.texlive}}
 
|
 
|
 
|-
 
|-
Line 1,194: Line 1,595:
 
set directory&#61;$XDG_CACHE_HOME/vim/swap
 
set directory&#61;$XDG_CACHE_HOME/vim/swap
 
set backupdir&#61;$XDG_CACHE_HOME/vim/backup
 
set backupdir&#61;$XDG_CACHE_HOME/vim/backup
set viminfo+&#61;n$XDG_CACHE_HOME/vim/viminfo
+
set viminfo+&#61;'1000,n$XDG_CACHE_HOME/vim/viminfo
set runtimepath&#61;$XDG_CONFIG_HOME/vim,$XDG_CONFIG_HOME/vim/after,$VIMRUNTIME
+
set runtimepath&#61;$XDG_CONFIG_HOME/vim,$VIMRUNTIME,$XDG_CONFIG_HOME/vim/after
 
}}
 
}}
  
 
{{hc|~/.profile|
 
{{hc|~/.profile|
export VIMINIT&#61;"$XDG_CONFIG_HOME"/vim/vimrc
+
export VIMINIT&#61;":source $XDG_CONFIG_HOME"/vim/vimrc
 
}}
 
}}
  
Line 1,211: Line 1,612:
 
{{ic|1=$ export VIMPERATOR_RUNTIME="$XDG_CONFIG_HOME"/vimperator}}
 
{{ic|1=$ export VIMPERATOR_RUNTIME="$XDG_CONFIG_HOME"/vimperator}}
 
|-
 
|-
| [http://w1.fi/ wpa_cli]
+
| {{pkg|w3m}}
 +
| {{ic|~/.w3m}}
 +
| [https://sourceforge.net/p/w3m/feature-requests/31/]
 +
|
 +
|-
 +
| [https://w1.fi/ wpa_cli]
 
| {{ic|~/.wpa_cli_history}}
 
| {{ic|~/.wpa_cli_history}}
 
|
 
|
Line 1,220: Line 1,626:
 
|
 
|
 
| For some reason the script {{ic|xdg-desktop-menu}} hard-codes {{ic|gnome_user_dir&#61;"$HOME/.gnome/apps"}}.  This is used by [[chromium]] amoung others.
 
| For some reason the script {{ic|xdg-desktop-menu}} hard-codes {{ic|gnome_user_dir&#61;"$HOME/.gnome/apps"}}.  This is used by [[chromium]] amoung others.
|-
 
| [[xmonad]]
 
| {{ic|~/.xmonad}}
 
| [https://code.google.com/p/xmonad/issues/detail?id=484]
 
|
 
 
|-
 
|-
 
| [https://opensource.conformal.com/wiki/xombrero xombrero]
 
| [https://opensource.conformal.com/wiki/xombrero xombrero]
 
| {{ic|~/.xombrero}}
 
| {{ic|~/.xombrero}}
 
| [https://github.com/conformal/xombrero/issues/74]
 
| [https://github.com/conformal/xombrero/issues/74]
 +
|
 +
|-
 +
| {{pkg|yarn}}
 +
| {{ic|~/.yarnrc}}
 +
 +
{{ic|~/.yarn/}}
 +
 +
{{ic|~/.yarncache/}}
 +
 +
{{ic|~/.yarn-config/}}
 +
| [https://github.com/yarnpkg/yarn/issues/2334]
 
|
 
|
 
|-
 
|-
Line 1,249: Line 1,661:
 
; C
 
; C
 
: [https://github.com/Cloudef/chck/tree/master/chck/xdg C99: Cloudef's simple implementation].
 
: [https://github.com/Cloudef/chck/tree/master/chck/xdg C99: Cloudef's simple implementation].
 +
 +
; JVM: Java, Kotlin, Clojure, Scala, ...
 +
: [https://github.com/soc/directories directories]
  
 
; Haskell
 
; Haskell
Line 1,257: Line 1,672:
 
: [http://search.cpan.org/dist/File-BaseDir/lib/File/BaseDir.pm File-BaseDir]
 
: [http://search.cpan.org/dist/File-BaseDir/lib/File/BaseDir.pm File-BaseDir]
 
: [https://github.com/Aerdan/perl-file-xdg perl-file-xdg]
 
: [https://github.com/Aerdan/perl-file-xdg perl-file-xdg]
 +
 +
; Ruby
 +
: [https://github.com/rubyworks/xdg rubyworks/xdg]
  
 
; Python
 
; Python

Revision as of 10:30, 18 March 2018

This article exists to catalog the growing set of software using the XDG Base Directory Specification introduced in 2003. This is here to demonstrate the viability of this specification by listing commonly found dotfiles and their support status. For those not currently supporting the Base Directory Specification, workarounds will be demonstrated to emulate it instead.

The workarounds will be limited to anything not involving patching the source, executing code stored in environment variables or compile-time options. The rationale for this is that configurations should be portable across systems and having compile-time options prevent that.

Hopefully this will provide a source of information about exactly what certain kinds of dotfiles are and where they come from.

XDG Base Directory specification

Please read the full specification. This section will attempt to break down the essence of what it tries to achieve.

Only XDG_RUNTIME_DIR is set by default through pam_systemd. It is up to the user to explicitly define the other variables, using absolute paths that point to existing directories.

User directories

  • XDG_CONFIG_HOME
    • Where user-specific configurations should be written (analogous to /etc).
    • Should default to $HOME/.config.
  • XDG_CACHE_HOME
    • Where user-specific non-essential (cached) data should be written (analogous to /var/cache).
    • Should default to $HOME/.cache.
  • XDG_DATA_HOME
    • Where user-specific data files should be written (analogous to /usr/share).
    • Should default to $HOME/.local/share.
  • XDG_RUNTIME_DIR
    • Used for non-essential, user-specific data files such as sockets, named pipes, etc.
    • Not required to have a default value; warnings should be issued if not set or equivalents provided.
    • Must be owned by the user with an access mode of 0700.
    • Filesystem fully featured by standards of OS.
    • Must be on the local filesystem.
    • May be subject to periodic cleanup.
    • Modified every 6 hours or set sticky bit if persistence is desired.
    • Can only exist for the duration of the user's login.
    • Should not store large files as it may be mounted as a tmpfs.

System directories

  • XDG_DATA_DIRS
    • List of directories seperated by : (analogous to PATH).
    • Should default to /usr/local/share:/usr/share.
  • XDG_CONFIG_DIRS
    • List of directories seperated by : (analogous to PATH).
    • Should default to /etc/xdg.

Contributing

When contributing make sure to use the correct section.

Nothing should require code evaluation (such as vim and VIMINIT), patches or compile-time options to gain support and anything which does must be deemed hardcoded. Additionally if the process is too error prone or difficult, such as Haskell's cabal or Eclipse, they should also be considered as hardcoded.

  • The first column should be the project name, ideally the command name if it is not ambiguous, linked to their website or an appropriate internal wiki article.
  • The second column is for any legacy files and directories the project had (one per line), this is done so people can find them even if they are no longer read.
  • In the third, try to find the commit or version a project switched to XDG Base Directory or any open discussions and include them in the next two columns (two per line).
  • The last column should include any appropriate workarounds or solutions. Please verify that your solution is correct and functional.

Supported

Application Legacy Path Supported Since Discussion Notes
aerc
antimicro ~/.antimicro edba864 [1]
aria2 ~/.aria2 8bc1d37 [2]
Asunder ~/.asunder

~/.asunder_album_artist

~/.asunder_album_genre

~/.asunder_album_title

2.9.0 [3] Uses XDG_CONFIG_HOME/asunder/asunder for ~/.asunder and XDG_CACHE_HOME/asunder/asunder_album_... for the other 3 files. Legacy paths are not removed after migration, they have to be deleted manually.
blender ~/.blender 4293f473 [4]
burp f2388e9
chromium ~/.chromium 23057 [5] [6]
citra ~/.citra-emu f7c3193fec [7]
composer ~/.composer 1.0.0-beta1 [8]
cower 8b70805
d-feet ~/.d-feet 7f6104b
dconf
dolphin-emu ~/.dolphin-emu a498c68 [9]
dr14-meter 7e777ca64 [10] Hardcoded $HOME/.config/dr14meter
dunst 78b6e2b1 [11]
dwb
fish
fontconfig ~/.fontconfig

~/.fonts

8c255fb1 Use "$XDG_DATA_HOME"/fonts to store fonts instead.
fontforge ~/.FontForge

~/.PfaEdit

e4c2cc7432 [12] [13]
freerdp ~/.freerdp edf6e7258d
Gajim ~/.gajim 3e777ea [14]
gconf ~/.gconf fc28caa7 [15]
GIMP ~/.gimp-x.y

~/.thumbnails

60e0cfe 483505f [16] [17]
git ~/.gitconfig 0d94427e
gstreamer ~/.gstreamer-0.10 4e36f93924cf [18]
gtk3
htop ~/.htoprc 93233a67
i3 ~/.i3 7c130fb54
i3status ~/.i3status.conf c3f7fc4994
imagemagick
inkscape ~/.inkscape 0.47 [19]
latexmk ~/.latexmkrc
lftp ~/.lftp 21dc400 [20]
lgogdownloader ~/.gogdownloader d430af63d000 [21]
LibreOffice a6f56f70 25bd2eec [22]
livestreamer ~/.livestreamerrc ea805917 [23]
llpp 3ab86f0cb Currently llpp places the configuration directly under XDG_CONFIG_HOME instead of creating a directory.
mc ~/.mc 1b9957058 0b7115647

ce401d797

[24]
Mercurial ~/.hgrc 354020079723 4.2 XDG_CONFIG_HOME/hg/hgrc.
mesa 87ab26b2ab XDG_CACHE_HOME/mesa
milkytracker ~/.milkytracker_config eb487c55 [25]
mintty ~/.minttyrc cff1bd8f v2.3.7. [26]
mpd ~/.mpdconf 87b73284
mpv ~/.mpv cb250d490 [27]
mutt ~/.mutt 42fee7585f [28]
mypaint ~/.mypaint cf723b74cd
nano ~/.nano/ ~/.nanorc 036fc403 [29]
ncmpcpp ~/.ncmpcpp 38d9f811 27cd86e0 [30] [31] ncmpcpp_directory should be set to avoid an error.log file in ~/.ncmpcpp.
neovim ~/.nvim

~/.nvimlog

~/.nviminfo

1ca5646bb [32] [33]
newsbeuter ~/.newsbeuter 3c57824c5 [34] It is required to create both directories [35]:

$ mkdir -p "$XDG_DATA_HOME"/newsbeuter "$XDG_CONFIG_HOME"/newsbeuter

NVIDIA ~/.nv
OfflineIMAP ~/.offlineimaprc 5150de5 [36]
opentyrian ~/.opentyrian 8d45ff2 [37]
pcsx2 ~/.pcsx2 87f1e8f77 a9020c606

3b22f0fb0 0a012aec2

[38] [39]
pip ~/.pip 6.0 [40]
ppsspp ~/.ppsspp 132fe47c7d [41]
procps-ng ~/.toprc af53e170b9 [42] [43]
orbment
pacman ~/.makepkg.conf 80eca94c8 [44]
Panda3D ~/.panda3d 2b537d2
PulseAudio ~/.pulse

~/.pulse-cookie

59a8618dcd9 87ae8307057

9ab510a6921 4c195bcc9d5

[45]
pyroom
qutebrowser
qtile fd8686e 66d704b

51cff01

[46] Some optional bar widgets can create files and directories in non-compliant paths, but most often these are still configurable.
rclone ~/.rclone.conf 9d362589 [47]
retroarch
rr ~/.rr 02e7d41e [48]
rTorrent ~/.rtorrent.rc 6a8d332b
Skype ~/.Skype 8.0
Snes9x ~/.snes9x 19864677 [49] By default configuration is blank, is intended that the user fill it at they will (throw the gui or manually) before launch a rom
sublime-text-devAUR Cache is placed in $XDG_CONFIG_HOME/sublime-text-3/Cache instead of expected $XDG_CACHE_HOME/sublime-text-3.
surfraw ~/.surfraw.conf

~/.surfraw.bookmarks

3e4591d8 bd8c427d

f57fc718

sway ~/.sway/config 614393c09 [50]
systemd
termite
tmuxinator ~/.tmuxinator 2636923 [51]
transmission ~/.transmission 5517 [52]
util-linux 570b32100
uzbl c6fd63a [53]
vimb
VirtualBox ~/.VirtualBox 4.3 [54]
vis ~/.vis [55] 68a25c75

d138908c

VLC media player ~/.vlcrc 16f32e15 [56]
warsow ~/.warsow-2.x 98ece3f [57]
wireshark ~/.wireshark b0b53fa5
xsettingsd ~/.xsettingsd 4ecd7be
xmonad ~/.xmonad 40fc10b6 [58] [59] Alternatively the environments XMONAD_CONFIG_HOME, XMONAD_DATA_HOME, and XMONAD_CACHE_HOME are also available.
xsel ~/.xsel.log ee7b4811 [60]

Partial

Application Legacy Path Supported Since Discussion Notes
abook ~/.abook $ abook --config "$XDG_CONFIG_HOME"/abook/abookrc \

--datafile "$XDG_CACHE_HOME"/abook/addressbook

Anki ~/Anki

~/Documents/Anki

[61] [62] $ anki -b "$XDG_DATA_HOME"/Anki
aspell ~/.aspell.conf $ export ASPELL_CONF="per-conf $XDG_CONFIG_HOME/aspell/aspell.conf; personal $XDG_CONFIG_HOME/aspell/en.pws; repl $XDG_CONFIG_HOME/aspell/en.prepl"
Atom ~/.atom [63] $ export ATOM_HOME="$XDG_DATA_HOME"/atom
bazaar ~/.bazaar

~/.bzr.log

2.3.0 [64] Discussion in upstream bug states that bazaar wil use ~/.config/bazaar if it exists. The logfile ~/.bzr.log might still be written.
Ruby#Bundler ~/.bundle [65] [66] $ export BUNDLE_USER_CONFIG="$XDG_CONFIG_HOME"/bundle BUNDLE_USER_CACHE="$XDG_CACHE_HOME"/bundle BUNDLE_USER_PLUGIN="$XDG_DATA_HOME"/bundle
cargo ~/.cargo [67] [68] [69] $ export CARGO_HOME="$XDG_DATA_HOME"/cargo
ccache ~/.ccache $ export CCACHE_DIR="$XDG_CACHE_HOME"/ccache
ChezScheme ~/.chezscheme_history $ petite --eehistory "$XDG_DATA_HOME"/chezscheme/history
conky ~/.conkyrc 00481ee [70] $ conky --config="$XDG_CONFIG_HOME"/conky/conkyrc
coreutils ~/.dircolors $ source "$(dircolors "$XDG_CONFIG_HOME"/dircolors)"
crawl ~/.crawl The trailing slash is required:

$ export CRAWL_DIR="$XDG_DATA_HOME"/crawl/

CUDA ~/.nv $ export CUDA_CACHE_PATH="$XDG_CACHE_HOME"/nv
dict ~/.dictrc $ dict -c "$XDG_CONFIG_HOME"/dict/dictrc
ELinks ~/.elinks $ export ELINKS_CONFDIR="$XDG_CONFIG_HOME"/elinks
emscripten ~/.emscripten

~/.emscripten_sanity

~/.emscripten_ports

~/.emscripten_cache__last_clear

[71] $ export EM_CONFIG="$XDG_CONFIG_HOME"/emscripten/config

$ export EM_CACHE="$XDG_CACHE_HOME"/emscripten/cache

$ export EM_PORTS="$XDG_DATA_HOME"/emscripten/cache

$ emcc --em-config "$XDG_CONFIG_HOME"/emscripten/config \ --em-cache "$XDG_CACHE_HOME"/emscripten/cache

freecad ~/.FreeCAD [72] $ freecad -u "$XDG_CONFIG_HOME"/FreeCAD/user.cfg -s "$XDG_CONFIG_HOME"/FreeCAD/system.cfg
gdb ~/.gdbinit $ gdb -nh -x "$XDG_CONFIG_HOME"/gdb/init
get_iplayer ~/.get_iplayer $ export GETIPLAYERUSERPREFS="$XDG_DATA_HOME"/get_iplayer
getmail ~/.getmail/getmailrc $ getmail --rcfile="$XDG_CONFIG_HOME/getmail/getmailrc" --getmaildir="$XDG_DATA_HOME/getmail"
gliv ~/.glivrc $ gliv --glivrc="$XDG_CONFIG_HOME"/gliv/glivrc
GnuPG ~/.gnupg [73] [74] $ export GNUPGHOME="$XDG_CONFIG_HOME"/gnupg

$ gpg2 --homedir "$XDG_CONFIG_HOME"/gnupg

Google Earth ~/.googleearth Some paths can be changed with the KMLPath and CachePath options in ~/.config/Google/GoogleEarthPlus.conf
GQ LDAP client ~/.gq

~/.gq-state

1.51 $ export GQRC="$XDG_CONFIG_HOME"/gqrc

$ export GQSTATE="$XDG_DATA_HOME"/gq/gq-state

$ mkdir -p "$(dirname "$GQSTATE")"

gradle ~/.gradle [75] $ export GRADLE_USER_HOME="$XDG_DATA_HOME"/gradle
gtk ~/.gtkrc $ export GTK_RC_FILES="$XDG_CONFIG_HOME"/gtk-1.0/gtkrc
gtk2 ~/.gtkrc-2.0 $ export GTK2_RC_FILES="$XDG_CONFIG_HOME"/gtk-2.0/gtkrc
httpie ~/.httpie [76] $ export HTTPIE_CONFIG_DIR="$XDG_CONFIG_HOME"/httpie
ipython/jupyter ~/.ipython $ export IPYTHONDIR="$XDG_CONFIG_HOME"/jupyter

$ export JUPYTER_CONFIG_DIR="$XDG_CONFIG_HOME"/jupyter

irssi ~/.irssi [77] $ irssi --config="$XDG_CONFIG_HOME"/irssi/config \

--home="$XDG_DATA_HOME"/irssi

isync ~/.mbsyncrc $ mbsync -c "$XDG_CONFIG_HOME"/isync/mbsyncrc
Java (OpenJDK) ~/.java/.userPrefs $ export _JAVA_OPTIONS=-Djava.util.prefs.userRoot="$XDG_CONFIG_HOME"/java
less ~/.lesshst $ mkdir -p "$XDG_CACHE_HOME"/less

$ export LESSHISTFILE="$XDG_CACHE_HOME"/less/history

$ export LESSHISTFILE=- can be used to disable this feature.

$ export LESSKEY="$XDG_CONFIG_HOME"/less/lesskey

libdvdcss ~/.dvdcss [78] $ export DVDCSS_CACHE="$XDG_DATA_HOME"/dvdcss
libice ~/.ICEauthority [79] $ export ICEAUTHORITY="$XDG_RUNTIME_DIR"/ICEauthority

Be wary setting this too restrictively, e.g. gdm needs access to a user's ICEauthority file.

libx11 ~/.XCompose $ export XCOMPOSEFILE="$XDG_CONFIG_HOME"/X11/xcompose
ltrace ~/.ltrace.conf $ ltrace -F "$XDG_CONFIG_HOME"/ltrace/ltrace.conf
maven ~/.m2 $ mvn -gs "$XDG_CONFIG_HOME"/maven/settings.xml
settings.xml
<settings xmlns="http://maven.apache.org/SETTINGS/1.0.0"
  xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
  xsi:schemaLocation="http://maven.apache.org/SETTINGS/1.0.0
                      https://maven.apache.org/xsd/settings-1.0.0.xsd">
  ...
  <localRepository>${env.XDG_CACHE_HOME}/maven/repository</localRepository>
  ...
</settings>
Mathematica ~/.Mathematica $ export MATHEMATICA_USERBASE="$XDG_CONFIG_HOME"/mathematica
mednafen ~/.mednafen $ export MEDNAFEN_HOME="$XDG_CONFIG_HOME"/mednafen
moc ~/.moc $ mocp -M "$XDG_CONFIG_HOME"/moc

$ mocp -O MOCDir="$XDG_CONFIG_HOME"/moc

most ~/.mostrc $ export MOST_INITFILE="$XDG_CONFIG_HOME"/mostrc
MPlayer ~/.mplayer $ export MPLAYER_HOME="$XDG_CONFIG_HOME"/mplayer
msmtp ~/.msmtprc $ msmtp -C "$XDG_CONFIG_HOME"/msmtp/msmtprc
MySQL ~/.mysql_history $ export MYSQL_HISTFILE="$XDG_DATA_HOME"/mysql_history
ncurses ~/.terminfo Precludes system path searching:

$ export TERMINFO="$XDG_DATA_HOME"/terminfo

$ export TERMINFO_DIRS="$XDG_DATA_HOME"/terminfo:/usr/share/terminfo

ncmpc ~/.ncmpc ncmpc -f "$XDG_CONFIG_HOME"/ncmpc/config
Netbeans ~/.netbeans [80] $ netbeans --userdir "${XDG_CONFIG_HOME}"/netbeans
Node.js ~/.node_repl_history $ export NODE_REPL_HISTORY="$XDG_DATA_HOME"/node_repl_history [81]
notmuch ~/.notmuch-config [82] $ export NOTMUCH_CONFIG="$XDG_CONFIG_HOME"/notmuch/notmuchrc

$ export NMBGIT="$XDG_DATA_HOME"/notmuch/nmbug

npm ~/.npm

~/.npmrc

[83] $ export NPM_CONFIG_USERCONFIG=$XDG_CONFIG_HOME/npm/npmrc
npmrc
prefix=${XDG_DATA_HOME}/npm
cache=${XDG_CACHE_HOME}/npm
tmp=${XDG_RUNTIME_DIR}/npm
init-module=${XDG_CONFIG_HOME}/npm/config/npm-init.js

prefix is unnecessary (and unsupported) if Node.js is installed by nvmAUR.

nvidia-settings ~/.nvidia-settings-rc $ nvidia-settings --config="$XDG_CONFIG_HOME"/nvidia/settings
nvmAUR ~/.nvm $ export NVM_DIR="$XDG_DATA_HOME"/nvm
Octave ~/octave

~/.octave_packages

~/.octave_hist

$ export OCTAVE_HISTFILE="$XDG_CACHE_HOME/octave-hsts"

$ export OCTAVE_SITE_INITFILE="$XDG_CONFIG_HOME/octave/octaverc"

$XDG_CONFIG_HOME/octave/octaverc
source /usr/share/octave/site/m/startup/octaverc;
pkg prefix ~/.local/share/octave/packages ~/.local/share/octave/packages;
pkg local_list /home/<your username>/.local/share/octave/octave_packages;

The local_list option must be given an absolute path.

openscad ~/.OpenSCAD 7c3077b0f [84] Does not fully honour XDG Base Directory Specification, see [85]

Currently it hard-codes ~/.local/share.

OpenSSL ~/.rnd Seeding file .rnd's location can be set with RANDFILE environment variable per FAQ.
Pass ~/.password-store $ export PASSWORD_STORE_DIR="$XDG_DATA_HOME"/pass
Pidgin ~/.purple [86] $ pidgin --config="$XDG_DATA_HOME"/purple
postgresql ~/.psqlrc

~/.psql_history

~/.pgpass

~/.pg_service.conf

9.2 [87]

[88]

$ export PSQLRC="$XDG_CONFIG_HOME/pg/psqlrc"

$ export PSQL_HISTORY="$XDG_CACHE_HOME/pg/psql_history"

$ export PGPASSFILE="$XDG_CONFIG_HOME/pg/pgpass"

$ export PGSERVICEFILE="$XDG_CONFIG_HOME/pg/pg_service.conf"

It is required to create both directories $ mkdir "$XDG_CONFIG_HOME/pg" && mkdir "$XDG_CACHE_HOME/pg"

PulseAudio ~/.esd_auth Very likely generated by the module-esound-protocol-unix.so module. It can be configured to use a different location but it makes much more sense to just comment out this module in /etc/pulse/default.pa or "$XDG_CONFIG_HOME"/pulse/default.pa.
pylint ~/.pylint.d [89]won't $ export PYLINTHOME="$XDG_CACHE_HOME"/pylint
python-setuptools ~/.python-eggs $ export PYTHON_EGG_CACHE="$XDG_CACHE_HOME"/python-eggs
readline ~/.inputrc $ export INPUTRC="$XDG_CONFIG_HOME"/readline/inputrc
rlwrap ~/.*_history [90] $ export RLWRAP_HOME="$XDG_DATA_HOME"/rlwrap
RubyGems ~/.gem $ export GEM_HOME="$XDG_DATA_HOME"/gem

$ export GEM_SPEC_CACHE="$XDG_CACHE_HOME"/gem

rustup ~/.rustup [91] $ export RUSTUP_HOME="$XDG_DATA_HOME"/rustup
sbt ~/.sbt

~/.ivy2

[92] $ sbt -ivy "$XDG_DATA_HOME"/ivy2 -sbt-dir "$XDG_DATA_HOME"/sbt (beware [93])
screen ~/.screenrc $ export SCREENRC="$XDG_CONFIG_HOME"/screen/screenrc
stack ~/.stack [94] $ export STACK_ROOT="$XDG_DATA_HOME"/stack
subversion ~/.subversion [95] [96][97] $ svn --config-dir "$XDG_CONFIG_HOME"/subversion
task ~/.task

~/.taskrc

$ export TASKDATA="$XDG_DATA_HOME"/task

$ export TASKRC="$XDG_CONFIG_HOME"/task/taskrc

tig ~/.tigrc $ export TIGRC_USER="$XDG_CONFIG_HOME"/tig/tigrc
tiptop ~/.tiptoprc This will still expect the .tiptoprc file.

$ tiptop -W "$XDG_CONFIG_HOME"/tiptop

tmux ~/.tmux.conf [98][dead link 2017-12-29] [99][dead link 2017-12-29] $ tmux -f "$XDG_CONFIG_HOME"/tmux/tmux.conf

$ export TMUX_TMPDIR="$XDG_RUNTIME_DIR"

uncrustify ~/.uncrustify.cfg $ export UNCRUSTIFY_CONFIG="$XDG_CONFIG_HOME"/uncrustify/uncrustify.cfg
Unison ~/.unison $ export UNISON="$XDG_DATA_HOME"/unison
urxvtd ~/.urxvt/urxvtd-hostname $ export RXVT_SOCKET="$XDG_RUNTIME_DIR"/urxvtd
WeeChat ~/.weechat [100] $ export WEECHAT_HOME="$XDG_CONFIG_HOME"/weechat

$ weechat -d "$XDG_CONFIG_HOME"/weechat

wget ~/.wgetrc

$ export WGETRC="$XDG_CONFIG_HOME/wgetrc" $ wget --hsts-file="$XDG_CACHE_HOME/wget-hsts"

wine ~/.wine [101] Winetricks uses XDG-alike location below for WINEPREFIX management:

$ mkdir -p "$XDG_DATA_HOME"/wineprefixes

$ export WINEPREFIX="$XDG_DATA_HOME"/wineprefixes/default

xorg-xauth ~/.Xauthority $ export XAUTHORITY="$XDG_RUNTIME_DIR"/Xauthority
xorg-xinit ~/.xinitrc

~/.xserverrc

$ export XINITRC="$XDG_CONFIG_HOME"/X11/xinitrc

$ export XSERVERRC="$XDG_CONFIG_HOME"/X11/xserverrc

Note that these variables are respected by xinit, but not by startx. Instead, specify the filename as an argument:

$ startx "$XDG_CONFIG_HOME/X11/xinitrc" -- vt1

xorg-xrdb ~/.Xresources

~/.Xdefaults

Ultimately you should be using Xresources and since these resources are loaded via xrdb you can specify a path such as $ xrdb -load ~/.config/X11/xresources.

Hardcoded

Application Legacy Path Discussion Notes
adb ~/.android [102] $ export ANDROID_SDK_HOME="$XDG_CONFIG_HOME"/android
AMule ~/.aMule
Android Studio ~/.AndroidStudio2.3

~/.android

~/.java

anthy ~/.anthy [103]
Apache Directory Studio ~/.ApacheDirectoryStudio
Arduino ~/.arduino15

~/.jssc

[104]won't
ARandR ~/.screenlayout
Audacity ~/.audacity-data
Avidemux ~/.avidemux6
bash ~/.bashrc

~/.bash_history

~/.bash_profile

~/.bash_login

~/.bash_logout

[105]won't $ export HISTFILE="$XDG_DATA_HOME"/bash/history

A specified bashrc can be sourced from /etc/bashrc.

Specify --init-file <file> as an alternative to ~/.bashrc for interactive shells.

cabal ~/.cabal [106] See discussion for potential workarounds. It is not very easy or straightforward but may be possible to emulate Base Directory compliance.
calibre ~/Calibre Library
CUPS ~/.cups [107]won't
darcs ~/.darcs [108]
dbus ~/.dbus [109] This should be avoidable with kdbus [citation needed].
Dia ~/.dia
eclipse ~/.eclipse [110] Option -Dosgi.configuration.area=@user.home/.config/.. overrides but must be added to "$ECLIPSE_HOME"/eclipse.ini" rather than command line which means you must have write access to $ECLIPSE_HOME. (Arch Linux hard-codes $ECLIPSE_HOME in /usr/bin/eclipse)
emacs ~/.emacs

~/.emacs.d

[111] It's possible to set HOME, but it has unexpected side effects. So far the most promising approach is modifying another Emacs environment variable to alter the load path and author your own site file which can manually load up your init file, but it changes the load process significantly.
Fetchmail ~/.fetchmailrc
Firefox ~/.mozilla [112]
Flatpak ~/.var/ [113] [114]
GHC ~/.ghc [115]
GNU parallel ~/.parallel
gtk-recordMyDesktop ~/.gtk-recordmydesktop
idris ~/.idris [116]
Java (OpenJDK) ~/.java/fonts, ~/.java/webviewJavaFX [117]RedHat
julia ~/.juliarc.jl

~/.julia_history

[118] [119]
Linux PAM ~/.pam_environment [120] Hardcoded in modules/pam_env/pam_env.c
lldb ~/.lldb

~/.lldbinit

mathomatic ~/.mathomaticrc

~/.matho_history

History can be moved by using rlwrap mathomatic -r with the RLWRAP_HOME environment set appropriately.
milkytracker ~/.milkytracker_config [121]
Minecraft ~/.minecraft [122]
mongodb ~/.mongorc.js

~/.dbshell

[123] This Stack Overflow thread suggests a partial workaround using command-line switch --norc.
~/.netrc Like ~/.ssh, many programs expect this file to be here. These include projects like curl (CURLOPT_NETRC_FILE), ftp (NETRC), s-nail (NETRC), etc. While some of them offer alternative configurable locations, many do not such as w3m, wget and lftp.
NSS ~/.pki [124]
OpenSSH ~/.ssh [125] Assumed to be present by many ssh daemons and clients such as DropBear and OpenSSH.
palemoon ~/.moonchild productions [126]
perf ~/.debug Hardcoded in tools/perf/util/config.c:29.
various shells and display managers ~/.profile
python ~/.python_history All history from interactive sessions is saved to ~/.python_history by default since version 3.4, custom path can still be set the same way as in older versions (see this example).
Qt Designer ~/.designer
Quod Libet ~/.quodlibet [127]
racket ~/.racketrc
RedNotebook ~/.rednotebook
Remarkable ~/.remarkable
Ren'Py ~/.renpy [128]
Scribus ~/.scribus
SeaMonkey ~/.mozilla [129]
Solfege ~/.solfege

~/.solfegerc

~/lessonfiles

[130]
SpamAssassin ~/.spamassassin
spectrwm ~/.spectrwm
SQLite ~/.sqlite_history

~/.sqliterc

[131][132] $ sqlite3 -init "$XDG_CONFIG_HOME"/sqlite3/sqliterc
Steam ~/.steam

~/.steampath ~/.steampid

[133] Many game engines (Unity 3D, Unreal) follow the specification, but then individual game publishers hardcode the paths in Steam Auto-Cloud causing game-saves to sync to the wrong directory.
TeamSpeak ~/.ts3client
TeXmacs ~/.TeXmacs
Thunderbird ~/.thunderbird [134]
tllocalmgr ~/.texlive
vim ~/.vim

~/.vimrc

~/.viminfo

Since 7.3.1178 vim will search for ~/.vim/vimrc if ~/.vimrc is not found.

$ mkdir -p "$XDG_CACHE_HOME"/vim/{undo,swap,backup}

"$XDG_CONFIG_HOME"/vim/vimrc
set undodir=$XDG_CACHE_HOME/vim/undo
set directory=$XDG_CACHE_HOME/vim/swap
set backupdir=$XDG_CACHE_HOME/vim/backup
set viminfo+='1000,n$XDG_CACHE_HOME/vim/viminfo
set runtimepath=$XDG_CONFIG_HOME/vim,$VIMRUNTIME,$XDG_CONFIG_HOME/vim/after
~/.profile
export VIMINIT=":source $XDG_CONFIG_HOME"/vim/vimrc
vimperator ~/.vimperatorrc [135] $ export VIMPERATOR_INIT=":source $XDG_CONFIG_HOME/vimperator/vimperatorrc"

$ export VIMPERATOR_RUNTIME="$XDG_CONFIG_HOME"/vimperator

w3m ~/.w3m [136]
wpa_cli ~/.wpa_cli_history
xdg-utils ~/.gnome For some reason the script xdg-desktop-menu hard-codes gnome_user_dir="$HOME/.gnome/apps". This is used by chromium amoung others.
xombrero ~/.xombrero [137]
yarn ~/.yarnrc

~/.yarn/

~/.yarncache/

~/.yarn-config/

[138]
zsh ~/.zshrc

~/.zprofile ~/.zshenv

~/.zlogin ~/.zlogout

~/.histfile

[139] Consider exporting ZDOTDIR=$HOME/.config/zsh in ~/.zshenv (this is hardcoded due to the bootstrap problem). You could also add this to /etc/zsh/zshenv and avoid the need for any dotfiles in your HOME. Doing this however requires root privilege which may not be viable and is system-wide.

$ export HISTFILE="$XDG_DATA_HOME"/zsh/history

Library and language support

C
C99: Cloudef's simple implementation.
JVM
Java, Kotlin, Clojure, Scala, ...
directories
Haskell
Officially in directory since 1.2.3.0 ab9d0810ce.
xdg-basedir
Perl
File-BaseDir
perl-file-xdg
Ruby
rubyworks/xdg
Python
pyxdg
Vala
Builtin support via GLib.Environment.
See get_user_cache_dir, get_user_data_dir, get_user_config_dir, etc.

See also