Difference between revisions of "XDG Base Directory"

From ArchWiki
Jump to navigation Jump to search
(→‎Hardcoded: remove Calibre, `~/Calibre Library` is movable, only contains library db and ebooks and related files which are not applicable for any XDG user dir, everything else like configs and cache are in the appropriate XDG dirs.)
(→‎Supported: add Calibre)
Line 115: Line 115:
| [https://github.com/falconindy/burp/commit/f2388e9 f2388e9]
| [https://github.com/falconindy/burp/commit/f2388e9 f2388e9]
| {{pkg|Calibre}}

Revision as of 23:35, 13 August 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

    • Where user-specific configurations should be written (analogous to /etc).
    • Should default to $HOME/.config.
    • Where user-specific non-essential (cached) data should be written (analogous to /var/cache).
    • Should default to $HOME/.cache.
    • Where user-specific data files should be written (analogous to /usr/share).
    • Should default to $HOME/.local/share.
    • 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

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


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.


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




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
dolphin-emu ~/.dolphin-emu a498c68 [9]
dr14-meter 7e777ca64 [10] XDG_CONFIG_HOME/dr14tmeter/
dunst 78b6e2b1 [11]
fontconfig ~/.fontconfig


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


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


60e0cfe 483505f [16] [17]
git ~/.gitconfig 0d94427e
gstreamer ~/.gstreamer-0.10 4e36f93924cf [18]
htop ~/.htoprc 93233a67
i3 ~/.i3 7c130fb54
i3status ~/.i3status.conf c3f7fc4994
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


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.
NP2kai ~/.config/np2kai ~/.config/xnp2kai 56a1cc2 Pull Request #50
neovim ~/.nvim



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]
powershellAUR 6.0
ppsspp ~/.ppsspp 132fe47c7d [41]
procps-ng ~/.toprc af53e170b9 [42] [43]
pacman ~/.makepkg.conf 80eca94c8 [44]
Panda3D ~/.panda3d 2b537d2
PulseAudio ~/.pulse


59a8618dcd9 87ae8307057

9ab510a6921 4c195bcc9d5

qtile fd8686e 66d704b


[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]
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


3e4591d8 bd8c427d


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


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]
yarn ~/.yarnrc




2d454b55 [61]


Application Legacy Path Supported Since Discussion Notes
abook ~/.abook $ abook --config "$XDG_CONFIG_HOME"/abook/abookrc --datafile "$XDG_CACHE_HOME"/abook/addressbook
Anki ~/Anki


[62] [63] $ 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 [64] $ export ATOM_HOME="$XDG_DATA_HOME"/atom
aws-cli ~/.aws 1.7.45 [65] $ export AWS_SHARED_CREDENTIALS_FILE="$XDG_CONFIG_HOME"/aws/credentials

$ export AWS_CONFIG_FILE="$XDG_CONFIG_HOME"/aws/config

bash-completion ~/.bash_completion $ export BASH_COMPLETION_USER_FILE="$XDG_CONFIG_HOME"/bash-completion/bash_completion
bazaar ~/.bazaar


2.3.0 [66] 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 [67] [68] $ export BUNDLE_USER_CONFIG="$XDG_CONFIG_HOME"/bundle BUNDLE_USER_CACHE="$XDG_CACHE_HOME"/bundle BUNDLE_USER_PLUGIN="$XDG_DATA_HOME"/bundle
cargo ~/.cargo [69] [70] [71] [72] $ 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 [73] $ 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/

dict ~/.dictrc $ dict -c "$XDG_CONFIG_HOME"/dict/dictrc
Docker ~/.docker $ export DOCKER_CONFIG="$XDG_CONFIG_HOME"/docker
Docker Machine ~/.docker/machine $ export MACHINE_STORAGE_PATH="$XDG_DATA_HOME"/docker-machine
ELinks ~/.elinks $ export ELINKS_CONFDIR="$XDG_CONFIG_HOME"/elinks
emscripten ~/.emscripten




[74] $ 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 [75] $ 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 [76] [77] $ 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


1.51 $ export GQRC="$XDG_CONFIG_HOME"/gqrc

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

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

gradle ~/.gradle [78] $ 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 [79] $ export HTTPIE_CONFIG_DIR="$XDG_CONFIG_HOME"/httpie
ipython/jupyter ~/.ipython $ export IPYTHONDIR="$XDG_CONFIG_HOME"/jupyter


irb ~/.irbrc
$ export IRBRC="$XDG_CONFIG_HOME"/irb/irbrc
IRB.conf[:SAVE_HISTORY] ||= 1000
IRB.conf[:HISTORY_FILE] ||= File.join(ENV["XDG_DATA_HOME"], "irb", "history")
irssi ~/.irssi [80] $ 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 [81] $ export DVDCSS_CACHE="$XDG_DATA_HOME"/dvdcss
libice ~/.ICEauthority [82] $ export ICEAUTHORITY="$XDG_CACHE_HOME"/ICEauthority

Make sure XDG_CACHE_HOME is set beforehand to directory user running Xorg has write access to.

Do not use XDG_RUNTIME_DIR as it is available after login. Display managers that launch Xorg (like GDM) will repeatedly fail otherwise.

libx11 ~/.XCompose


$ export XCOMPOSEFILE="$XDG_CONFIG_HOME"/X11/xcompose

$ export XCOMPOSECACHE="$XDG_CACHE_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 xmlns="http://maven.apache.org/SETTINGS/1.0.0"
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 [83] $ netbeans --userdir "${XDG_CONFIG_HOME}"/netbeans
Node.js ~/.node_repl_history $ export NODE_REPL_HISTORY="$XDG_DATA_HOME"/node_repl_history [84]
notmuch ~/.notmuch-config [85] $ export NOTMUCH_CONFIG="$XDG_CONFIG_HOME"/notmuch/notmuchrc

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

npm ~/.npm



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



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

$ export OCTAVE_SITE_INITFILE="$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 [87] Does not fully honour XDG Base Directory Specification, see [88]

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

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




9.2 [90]


$ 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 [92]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 [93] $ export RLWRAP_HOME="$XDG_DATA_HOME"/rlwrap
RubyGems ~/.gem $ export GEM_HOME="$XDG_DATA_HOME"/gem


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


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


$ 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 [101][dead link 2017-12-29] [102][dead link 2017-12-29] $ tmux -f "$XDG_CONFIG_HOME"/tmux/tmux.conf


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
Vagrant ~/.vagrant.d


[103] $ export VAGRANT_HOME="$XDG_DATA_HOME"/vagrant

$ export VAGRANT_ALIAS_FILE="$XDG_DATA_HOME"/vagrant/aliases

WeeChat ~/.weechat [104] $ 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 [105] 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
xinit ~/.xinitrc


$ 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


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.


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



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


ARandR ~/.screenlayout
Audacity ~/.audacity-data/
Avidemux ~/.avidemux6
bash ~/.bashrc





[109]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/ [110] See discussion for potential workarounds. It is not very easy or straightforward but may be possible to emulate Base Directory compliance.
CUPS ~/.cups/ [111]won't
darcs ~/.darcs/ [112]
dbus ~/.dbus/ [113] This should be avoidable with kdbus [citation needed].
Dia ~/.dia/
eclipse ~/.eclipse/ [114] 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


[115] 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/ [116]
Flatpak ~/.var/ [117] [118] [119]
GHC ~/.ghc [120]
gtk-recordMyDesktop ~/.gtk-recordmydesktop
idris ~/.idris [121]
Java (OpenJDK) ~/.java/fonts, ~/.java/webviewJavaFX [122]RedHat
julia ~/.juliarc.jl


[123] [124]
Linux PAM ~/.pam_environment [125] Hardcoded in modules/pam_env/pam_env.c
lldb ~/.lldb


mathomatic ~/.mathomaticrc


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


[128] 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.
node-gyp ~/.node-gyp [129] [130] [131] Discussion seems as though partial support may soon be added.
NSS ~/.pki [132]
OpenSSH ~/.ssh [133] Assumed to be present by many ssh daemons and clients such as DropBear and OpenSSH.
palemoon ~/.moonchild productions [134]
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 [135]
racket ~/.racketrc
RedNotebook ~/.rednotebook
Remarkable ~/.remarkable
Ren'Py ~/.renpy [136]
SANE ~/.sane/ scanimage creates a .cal file there
Scribus ~/.scribus
SeaMonkey ~/.mozilla/ [137]
Solfege ~/.solfege



SpamAssassin ~/.spamassassin
spectrwm ~/.spectrwm
SQLite ~/.sqlite_history


[139][140] $ sqlite3 -init "$XDG_CONFIG_HOME"/sqlite3/sqliterc
Steam ~/.steam

~/.steampath ~/.steampid

[141] 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/ [142]
tllocalmgr ~/.texlive
vim ~/.vim



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

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

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
export VIMINIT=":source $XDG_CONFIG_HOME"/vim/vimrc
vimperator ~/.vimperatorrc [143] $ export VIMPERATOR_INIT=":source $XDG_CONFIG_HOME/vimperator/vimperatorrc"


w3m ~/.w3m [144]
wpa_cli ~/.wpa_cli_history
xdg-utils ~/.gnome [145] 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 [146]
zenmap nmap ~/.zenmap [147] [148]
zsh ~/.zshrc

~/.zprofile ~/.zshenv

~/.zlogin ~/.zlogout


[149] 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

C99: Cloudef's simple implementation.
Java, Kotlin, Clojure, Scala, ...
Officially in directory since ab9d0810ce.
Builtin support via GLib.Environment.
See get_user_cache_dir, get_user_data_dir, get_user_config_dir, etc.

See also