XDG Base Directory
This article summarizes the XDG Base Directory specification in #Specification and tracks software support in #Support.
Contents
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 according to the specification.
User directories
-
XDG_CONFIG_HOME
- Where user-specific configurations should be written (analogous to
/etc
). - Should default to
$HOME/.config
.
- Where user-specific configurations should be written (analogous to
-
XDG_CACHE_HOME
- Where user-specific non-essential (cached) data should be written (analogous to
/var/cache
). - Should default to
$HOME/.cache
.
- Where user-specific non-essential (cached) data should be written (analogous to
-
XDG_DATA_HOME
- Where user-specific data files should be written (analogous to
/usr/share
). - Should default to
$HOME/.local/share
.
- Where user-specific data files should be written (analogous to
-
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 separated by
:
(analogous toPATH
). - Should default to
/usr/local/share:/usr/share
.
- List of directories separated by
-
XDG_CONFIG_DIRS
- List of directories separated by
:
(analogous toPATH
). - Should default to
/etc/xdg
.
- List of directories separated by
Support
This section 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.
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 either a link to an internal article, a Template:Pkg or a Template:AUR.
- 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-gitAUR | ||||
antimicroAUR[broken link: package not found] |
~/.antimicro
|
edba864 | [1] | |
aria2 |
~/.aria2
|
8bc1d37 | [2] | |
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.
|
binwalk |
~/.binwalk
|
2051757 | [4] |
$XDG_CONFIG_HOME/binwalk
|
Blender |
~/.blender
|
4293f47 | [5] | |
calcurse |
~/.calcurse
|
04162d | [6] [7] |
XDG_CONFIG_HOME/calcurse
If the legacy path |
calibre | ||||
citra-gitAUR |
~/.citra-emu
|
f7c3193 | [8] | |
Composer |
~/.composer
|
1.0.0-beta1 | [9] | |
d-feet |
~/.d-feet
|
7f6104b | ||
dconf | ||||
Dolphin emulator |
~/.dolphin-emu
|
a498c68 | [10] | |
dr14_tmeterAUR | 7e777ca | [11] |
XDG_CONFIG_HOME/dr14tmeter/
|
|
dunst | 78b6e2b | [12] | ||
dwb | ||||
fish | ||||
fontconfig |
|
8c255fb | Use "$XDG_DATA_HOME"/fonts to store fonts instead.
|
|
fontforge |
|
e4c2cc7 | ||
freerdp |
~/.freerdp
|
edf6e72 | ||
Gajim |
~/.gajim
|
3e777ea | [15] | |
gconfAUR |
~/.gconf
|
fc28caa | [16] | |
GIMP |
|
|||
Git |
~/.gitconfig
|
0d94427 | ||
gops | 71c4255 | |||
GStreamer |
~/.gstreamer-0.10
|
4e36f93 | [19] | |
GTK 3 | ||||
htop |
~/.htoprc
|
93233a6 | ||
httpie |
~/.httpie
|
5af0874 | [20] | |
i3 |
~/.i3
|
7c130fb | ||
i3status |
~/.i3status.conf
|
c3f7fc4 | ||
imagemagick | ||||
Inkscape |
~/.inkscape
|
0.47 | [21] | |
iwd / iwctl |
~/.iwctl_history
|
d3e00d7f | ||
intellij-idea-community-edition |
~/.IntelliJIdea*
|
2020.1 | [22] | |
josm |
~/.josm
|
11162 | [23] | |
Kakoune | ||||
latexmk (in texlive-core) |
~/.latexmkrc
|
|||
lftp |
~/.lftp
|
21dc400 | [24] | |
lgogdownloaderAUR |
~/.gogdownloader
|
d430af6 | [25] | |
LibreOffice | [26] | |||
Streamlink |
~/.livestreamerrc
|
ea80591 | [27] | |
llpp | 3ab86f0 | Currently llpp places the configuration directly under XDG_CONFIG_HOME instead of creating a directory.
|
||
mc |
~/.mc
|
[28] | ||
Mercurial |
~/.hgrc
|
XDG_CONFIG_HOME/hg/hgrc .
|
||
msmtp |
~/.msmtprc
|
af2f409 v1.6.7+ |
XDG_CONFIG_HOME/msmtp/config .
|
|
mesa | 87ab26b |
XDG_CACHE_HOME/mesa
|
||
milkytracker |
~/.milkytracker_config
|
eb487c5 | [29] | |
mpd |
~/.mpdconf
|
87b7328 | ||
mpv |
~/.mpv
|
cb250d4 | [30] | |
mutt |
~/.mutt
|
b17cd67 | [31] | |
mypaint |
~/.mypaint
|
cf723b7 | ||
nano |
|
c16e79b | [32] | |
ncmpcpp |
~/.ncmpcpp
|
ncmpcpp_directory should be set to avoid an error.log file in ~/.ncmpcpp .
|
||
Neovim |
|
1ca5646 | ||
newsbeuter |
~/.newsbeuter
|
3c57824 | [37] | It is required to create both directories [38]:
|
node-gyp |
~/.node-gyp
|
2b5ce52a | [39] | Only available on master as of 2018-12-04. |
np2kai-gitAUR |
|
56a1cc2 | [40] | |
nteract-binAUR | 4593e72 | [41] [42] | does not recognize workarounds for ipython/jupyter | |
OfflineIMAP |
~/.offlineimaprc
|
5150de5 | [43] | |
opentyrianAUR |
~/.opentyrian
|
8d45ff2 | [44] | |
pandoc |
~/.pandoc/
|
0bed0ab | [45] | |
pcsx2 |
~/.pcsx2
|
[46] [47] | ||
Pry |
~/.pryrc
|
[48] | ||
python-pip |
~/.pip
|
6.0 | [49] | |
powershellAUR | 6.0 | |||
ppsspp |
~/.ppsspp
|
132fe47 | [50] | |
procps-ng |
~/.toprc
|
af53e17 | ||
orbment-gitAUR | ||||
pacman |
~/.makepkg.conf
|
80eca94 | [53] | |
panda3dAUR |
~/.panda3d
|
2b537d2 | ||
poezioAUR | ||||
PulseAudio |
|
[54] | ||
pyroomAUR | ||||
quodlibet |
~/.quodlibet
|
3.10.0 | [55] | |
qutebrowser | ||||
qtile | [56] | Some optional bar widgets can create files and directories in non-compliant paths, but most often these are still configurable. | ||
rclone |
~/.rclone.conf
|
9d36258 | [57] | |
retroarch | ||||
rrAUR |
~/.rr
|
02e7d41 | [58] | |
RSpec |
~/.rspec
|
5e395e2 | [59] | |
rTorrent |
~/.rtorrent.rc
|
6a8d332 | ||
RuboCop |
~/.rubocop.yml
|
6fe5956 | [60] | |
skypeforlinux-stable-binAUR |
~/.Skype
|
8.0 | ||
snes9x |
~/.snes9x
|
93b5f11 | [61] | By default, the configuration file is left blank with intention that the user will fill it at their will (through the gui or manually). |
sublime-text-devAUR | Cache is placed in $XDG_CONFIG_HOME/sublime-text-3/Cache instead of expected $XDG_CACHE_HOME/sublime-text-3 .
|
|||
surfraw |
|
|||
sway |
~/.sway/config
|
614393c | [62] | |
systemd | ||||
teeworlds |
~/.teeworlds
|
[63] | ||
termite | ||||
tig |
~/.tigrc , ~/.tig_history
|
2.2 | [64] |
~/.local/share/tig directory must exist, writes to ~/.tig_history otherwise.
|
tmux |
~/.tmux.conf
|
3.1 | [65] | |
tmuxinatorAUR |
~/.tmuxinator
|
2636923 | [66] | |
Transmission |
~/.transmission
|
b71a298 | ||
util-linux | 570b321 | |||
Uzbl | c6fd63a | [67] | ||
vimb | ||||
VirtualBox |
~/.VirtualBox
|
4.3 | [68] | |
vis |
~/.vis
|
[69] | ||
VLC |
~/.vlcrc
|
16f32e1 | [70] | |
warsow |
~/.warsow-2.x
|
98ece3f | [71] | |
Wireshark |
~/.wireshark
|
b0b53fa | ||
xsettingsd-gitAUR |
~/.xsettingsd
|
b4999f5 | ||
xmonad |
~/.xmonad
|
40fc10b | Alternatively the environments XMONAD_CONFIG_HOME , XMONAD_DATA_HOME , and XMONAD_CACHE_HOME are also available.
|
|
xsel |
~/.xsel.log
|
ee7b481 | [74] | |
yarn |
|
2d454b5 | [75] |
Partial
Application | Legacy Path | Supported Since | Discussion | Notes |
---|---|---|---|---|
abook |
~/.abook
|
$ abook --config "$XDG_CONFIG_HOME"/abook/abookrc --datafile "$XDG_DATA_HOME"/abook/addressbook
|
||
ack |
~/.ackrc
|
[76] |
$ export ACKRC="$XDG_CONFIG_HOME/ack/ackrc"
|
|
Anki |
|
[77] [78] |
$ 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
|
[79] |
$ export ATOM_HOME="$XDG_DATA_HOME"/atom
|
|
aws-cli |
~/.aws
|
1.7.45 | [80] |
|
bash-completion |
~/.bash_completion
|
$ export BASH_COMPLETION_USER_FILE="$XDG_CONFIG_HOME"/bash-completion/bash_completion
|
||
bazaar |
|
2.3.0 | [81] | Discussion in upstream bug states that bazaar will use ~/.config/bazaar if it exists. The logfile ~/.bzr.log might still be written.
|
buchhaltung-gitAUR |
|
[82] |
$ export BUCHHALTUNG="$XDG_CONFIG_HOME"/buchhaltung
|
|
Ruby#Bundler |
~/.bundle
|
[83] [84] |
$ export BUNDLE_USER_CONFIG="$XDG_CONFIG_HOME"/bundle BUNDLE_USER_CACHE="$XDG_CACHE_HOME"/bundle BUNDLE_USER_PLUGIN="$XDG_DATA_HOME"/bundle
|
|
Rust#Cargo |
~/.cargo
|
[85] [86] [87] [88] |
$ export CARGO_HOME="$XDG_DATA_HOME"/cargo
|
|
ccache |
~/.ccache
|
$ export CCACHE_CONFIGPATH="$XDG_CONFIG_HOME"/ccache.config
|
||
chez-schemeAUR |
~/.chezscheme_history
|
$ petite --eehistory "$XDG_DATA_HOME"/chezscheme/history
|
||
Chromium |
~/.chromium
|
23057 | ||
conky |
~/.conkyrc
|
00481ee | [92] |
$ conky --config="$XDG_CONFIG_HOME"/conky/conkyrc
|
coreutils |
~/.dircolors
|
$ eval $(dircolors "$XDG_CONFIG_HOME"/dircolors)
|
||
crawl |
~/.crawl
|
The trailing slash is required:
|
||
clusterssh |
~/.clusterssh/
|
$ alias cssh="cssh --config-file '$XDG_CONFIG_HOME/clusterssh/config'"
$XDG_CONFIG_HOME/clusterssh/config extra_cluster_file=$HOME/.config/clusterssh/clusters extra_tag_file=$HOME/.config/clusterssh/tags Despite this, clusterssh will still create |
||
CUDA |
~/.nv
|
$ export CUDA_CACHE_PATH="$XDG_CACHE_HOME"/nv
|
||
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
|
||
DOSBox |
~/.dosbox/dosbox-0.74-2.conf
|
[93] |
$ dosbox -conf "$XDG_CONFIG_HOME"/dosbox/dosbox.conf
|
|
Electrum Bitcoin Wallet |
~/.electrum
|
c121230 |
$ export ELECTRUMDIR="$XDG_DATA_HOME/electrum"
|
|
ELinks |
~/.elinks
|
$ export ELINKS_CONFDIR="$XDG_CONFIG_HOME"/elinks
|
||
elixir |
~/.mix
|
afaf889 | [94] [95] | Elixir do not fully conform to XDG specs, it will use XDG only if the environment variables are present, otherwise it will by default use legacy path. |
Emacs |
|
[96] | Not in 26.3 or older. Workaround for older versions: 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.
|
|
emscripten |
|
[97] |
|
|
freecadAUR |
~/.FreeCAD
|
[98] |
$ freecad -u "$XDG_CONFIG_HOME"/FreeCAD/user.cfg -s "$XDG_CONFIG_HOME"/FreeCAD/system.cfg
Despite these options, freecadAUR will still create the file |
|
GDB |
~/.gdbinit
|
$ gdb -nh -x "$XDG_CONFIG_HOME"/gdb/init
|
||
get_iplayerAUR |
~/.get_iplayer
|
$ export GETIPLAYERUSERPREFS="$XDG_DATA_HOME"/get_iplayer
|
||
getmail |
~/.getmail/getmailrc
|
$ getmail --rcfile="$XDG_CONFIG_HOME/getmail/getmailrc" --getmaildir="$XDG_DATA_HOME/getmail"
|
||
glivAUR |
~/.glivrc
|
$ gliv --glivrc="$XDG_CONFIG_HOME"/gliv/glivrc
|
||
GnuPG |
~/.gnupg
|
[99] [100] |
|
|
Go |
~/go
|
[101] |
|
|
Google Earth |
~/.googleearth
|
Some paths can be changed with the KMLPath and CachePath options in ~/.config/Google/GoogleEarthPlus.conf
|
||
gopass |
~/.password-store
|
Override settings in ~/.config/gopass/config.yml :
~/.config/gopass/config.yml root: path: gpgcli-gitcli-fs+file:///home/<userid>/.config/password-store |
||
GQ LDAP client |
|
1.51 |
|
|
Gradle |
~/.gradle
|
[102] |
$ export GRADLE_USER_HOME="$XDG_DATA_HOME"/gradle
|
|
GTK 1 |
~/.gtkrc
|
$ export GTK_RC_FILES="$XDG_CONFIG_HOME"/gtk-1.0/gtkrc
|
||
GTK 2 |
~/.gtkrc-2.0
|
$ export GTK2_RC_FILES="$XDG_CONFIG_HOME"/gtk-2.0/gtkrc
|
||
hledger |
~/.hledger.journal
|
[103] |
$ export LEDGER_FILE="$XDG_DATA_HOME"/hledger.journal
|
|
imapfilterAUR |
~/.imapfilter
|
$ export IMAPFILTER_HOME="$XDG_CONFIG_HOME/imapfilter"
|
||
ipython/jupyter |
~/.ipython
|
won't fix |
|
|
irb |
~/.irbrc
|
~/.profile $ export IRBRC="$XDG_CONFIG_HOME"/irb/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
|
[104] |
$ 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
|
[105] |
$ export _JAVA_OPTIONS=-Djava.util.prefs.userRoot="$XDG_CONFIG_HOME"/java
|
|
KDE |
~/.kde
|
[106] |
$ export KDEHOME="$XDG_CONFIG_HOME"/kde
|
|
ledger |
~/.ledgerrc , ~/.pricedb
|
[107] |
$ ledger --init-file "$XDG_CONFIG_HOME"/ledgerrc
|
|
less |
~/.lesshst
|
|
||
libdvdcss |
~/.dvdcss
|
[108] |
$ export DVDCSS_CACHE="$XDG_DATA_HOME"/dvdcss
|
|
libice |
~/.ICEauthority
|
[109] |
$ export ICEAUTHORITY="$XDG_CACHE_HOME"/ICEauthority
Make sure Do not use |
|
libx11 |
|
|
||
ltrace |
~/.ltrace.conf
|
$ ltrace -F "$XDG_CONFIG_HOME"/ltrace/ltrace.conf
|
||
maven |
~/.m2
|
[110] |
$ 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
|
||
mitmproxy |
~/.mitmproxy
|
|
||
MOC |
~/.moc
|
|
||
monero |
~/.bitmonero
|
$ monerod --data-dir "$XDG_DATA_HOME"/bitmonero
|
||
most |
~/.mostrc
|
$ export MOST_INITFILE="$XDG_CONFIG_HOME"/mostrc
|
||
MPlayer |
~/.mplayer
|
$ export MPLAYER_HOME="$XDG_CONFIG_HOME"/mplayer
|
||
MySQL |
~/.mysql_history
|
$ export MYSQL_HISTFILE="$XDG_DATA_HOME"/mysql_history
|
||
ncurses |
~/.terminfo
|
Precludes system path searching:
|
||
ncmpc |
~/.ncmpc
|
ncmpc -f "$XDG_CONFIG_HOME"/ncmpc/config
|
||
Netbeans |
~/.netbeans
|
[111] |
$ netbeans --userdir "${XDG_CONFIG_HOME}"/netbeans
|
|
Node.js |
~/.node_repl_history
|
$ export NODE_REPL_HISTORY="$XDG_DATA_HOME"/node_repl_history [112]
|
||
notmuch |
~/.notmuch-config
|
[113] |
|
|
npm |
|
[114] |
$ 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
|
|
nuget |
~/.nuget/packages
|
[115] |
$ export NUGET_PACKAGES="$XDG_CACHE_HOME"/NuGetPackages
|
|
NVIDIA |
~/.nv
|
Uses XDG_CACHE_HOME if set, otherwise improperly falls back to ~/.nv instead of ~/.cache .
|
||
nvidia-settings |
~/.nvidia-settings-rc
|
$ nvidia-settings --config="$XDG_CONFIG_HOME"/nvidia/settings
|
||
nvmAUR |
~/.nvm
|
$ export NVM_DIR="$XDG_DATA_HOME"/nvm
|
||
Octave |
|
$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 |
||
openscad |
~/.OpenSCAD
|
7c3077b0f | [116] | Does not fully honour XDG Base Directory Specification, see [117]
Currently it hard-codes |
OpenSSL |
~/.rnd
|
Seeding file .rnd 's location can be set with RANDFILE environment variable per FAQ.
|
||
parallel |
~/.parallel
|
20170422 |
$ export PARALLEL_HOME="$XDG_CONFIG_HOME"/parallel
|
|
Pass |
~/.password-store
|
$ export PASSWORD_STORE_DIR="$XDG_DATA_HOME"/pass
|
||
Pidgin |
~/.purple
|
[118] |
$ pidgin --config="$XDG_DATA_HOME"/purple
|
|
PostgreSQL |
|
9.2 | [119] [120] |
It is required to create both directories: |
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 .
|
||
python-azure-cliAUR |
~/.azure
|
$ export AZURE_CONFIG_DIR=$XDG_DATA_HOME/azure
|
||
python-gripAUR |
~/.grip
|
$ export GRIPHOME="$XDG_CONFIG_HOME/grip"
|
||
python-setuptools |
~/.python-eggs
|
$ export PYTHON_EGG_CACHE="$XDG_CACHE_HOME"/python-eggs
|
||
python-pylint |
~/.pylint.d
|
won't fix |
$ export PYLINTHOME="$XDG_CACHE_HOME"/pylint
|
|
racket |
~/.racketrc
|
[121] |
$ export PLTUSERHOME="$XDG_DATA_HOME"/racket
|
|
readline |
~/.inputrc
|
$ export INPUTRC="$XDG_CONFIG_HOME"/readline/inputrc
|
||
rlwrap |
~/.*_history
|
[122] |
$ export RLWRAP_HOME="$XDG_DATA_HOME"/rlwrap
|
|
Ruby#RubyGems |
~/.gem
|
Make sure to remove |
||
Rust#Rustup |
~/.rustup
|
[123] |
$ export RUSTUP_HOME="$XDG_DATA_HOME"/rustup
|
|
sbt |
~/.sbt
|
[124] |
$ sbt -ivy "$XDG_DATA_HOME"/ivy2 -sbt-dir "$XDG_DATA_HOME"/sbt (beware [125])
|
|
GNU Screen |
~/.screenrc
|
$ export SCREENRC="$XDG_CONFIG_HOME"/screen/screenrc
|
||
Haskell#Stack |
~/.stack
|
[126] |
$ export STACK_ROOT="$XDG_DATA_HOME"/stack
|
|
subversion |
~/.subversion
|
[127] [128][129] |
$ svn --config-dir "$XDG_CONFIG_HOME"/subversion
|
|
task |
|
|
||
tiptopAUR |
~/.tiptoprc
|
This will still expect the .tiptoprc file.
|
||
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 |
|
[130] |
|
|
Visual Studio Code |
~/.vscode-oss/argv.json
|
[131] | ||
WakaTime |
|
$ export WAKATIME_HOME="$XDG_CONFIG_HOME/wakatime"
The directory needs to be created manually: |
||
WeeChat |
~/.weechat
|
[132] [133] |
|
|
wget |
|
|
||
wine |
~/.wine
|
[134] |
Winetricks uses XDG-alike location below for WINEPREFIX management:
|
|
xbindkeys |
~/.xbindkeysrc
|
$ xbindkeys -f "$XDG_CONFIG_HOME"/xbindkeys/config
|
||
xorg-xauth |
~/.Xauthority
|
$ export XAUTHORITY="$XDG_RUNTIME_DIR"/Xauthority
Note that LightDM does not allow you to change this variable. If you change it nonetheless, you will not be able to login. Use startx instead or configure LightDM. According to [135] SLiM has |
||
xinit |
|
[136] |
Note that these variables are respected by xinit, but not by startx. Instead, specify the filename as an argument:
|
|
xorg-xrdb |
|
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 .
|
||
z |
|
[137] |
$ export _Z_DATA="$XDG_DATA_HOME/z"
|
Hardcoded
Application | Legacy Path | Discussion | Notes |
---|---|---|---|
adb |
~/.android/
|
[138] |
$ export ANDROID_SDK_HOME="$XDG_CONFIG_HOME"/android
|
Ansible |
~/.ansible
|
[139] | |
AMule |
~/.aMule
|
||
Android Studio |
|
||
anthy |
~/.anthy
|
[140] | |
Apache Directory Studio |
~/.ApacheDirectoryStudio
|
||
ARandR |
~/.screenlayout
|
||
Arduino |
|
won't fix | |
Audacity |
~/.audacity-data/
|
[141] | |
Avidemux |
~/.avidemux6
|
||
Bash |
|
won't fix |
$ export HISTFILE="$XDG_DATA_HOME"/bash/history
A specified Specify |
cabal |
~/.cabal/
|
[142] | See discussion for potential workarounds. It is not very easy or straightforward but may be possible to emulate Base Directory compliance. |
chattyAUR |
~/.chatty/
|
[143] | |
cmake |
~/.cmake/
|
Used for the user package registry ~/.cmake/packages/<package> , detailed in cmake-packages(7) and the Package registry wiki page. Looks like it's hardcoded, for example in cmFindPackageCommand.cxx.
|
|
Cinnamon |
~/.cinnamon/
|
[144] | |
cryptomatorAUR |
~/.Cryptomator
|
[145] | |
CUPS |
~/.cups/
|
won't fix | |
darcs |
~/.darcs/
|
[146] | |
dbus |
~/.dbus/
|
[147] | This should be avoidable with kdbus [citation needed]. |
devede |
~/.devedeng
|
Hardcoded here | |
Dia |
~/.dia/
|
||
dotnet-sdk |
~/.dotnet/
|
[148] | |
Eclipse |
~/.eclipse/
|
[149] | 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 )
|
Fetchmail |
~/.fetchmailrc
|
||
Firefox |
~/.mozilla/
|
[150] | |
Flatpak |
~/.var/
|
[151] [152] won't fix | |
fltk |
~/.fltk/
|
[153] | |
GHC |
~/.ghc
|
[154] | |
ghidra | [155] | ||
Goldendict |
~/.goldendict/
|
[156] | |
gramps |
~/.gramps/
|
[157] | |
grsync |
~/.grsync/
|
[158] | |
gtk-recordMyDesktop |
~/.gtk-recordmydesktop
|
||
hplip |
~/.hplip/
|
[159] | |
idris |
~/.idris
|
[160] | |
Java OpenJDK |
~/.java/fonts
|
[161] |
$ export _JAVA_OPTIONS=-Djava.util.prefs.userRoot="$XDG_CONFIG_HOME"/java
|
Java OpenJFX |
~/.java/webview
|
||
julia |
|
[162] [163] | |
Linux PAM |
~/.pam_environment
|
[164] | Hardcoded in modules/pam_env/pam_env.c |
lldb |
|
||
mathomatic |
|
History can be moved by using rlwrap mathomatic -r with the RLWRAP_HOME environment set appropriately.
|
|
Minecraft |
~/.minecraft/
|
[165] | |
Minetest |
~/.minetest/
|
won't fix [166] | |
mongodb |
|
[167] |
This Stack Overflow thread suggests a partial workaround using command-line switch --norc .
|
Nestopia UE |
~/.nestopia/
|
won't fix | |
~/.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.
|
||
Networkmanager-openvpn |
~/.cert/nm-openvpn
|
[168] | |
NSS |
~/.pki
|
[169] | |
OpenSSH |
~/.ssh
|
won't fix | Assumed to be present by many ssh daemons and clients such as DropBear and OpenSSH. |
palemoon |
~/.moonchild productions
|
[170] | |
parsec-binAUR |
~/.parsec
|
||
pcsxrAUR |
~/.pcsxr
|
A -cfg flag exists, but can only be set relative to ~/.pcsxr .
|
|
perf |
~/.debug
|
Hardcoded in tools/perf/util/config.c:29. | |
perl |
~/.cpan
|
Perl5's CPAN expects ~/.cpan .
|
|
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).
|
|
python-poetry |
~/.poetry
|
[171] |
POETRY_HOME can be used but it does not separate data and config.
|
Qt Designer |
~/.designer
|
||
RedNotebook |
~/.rednotebook
|
||
Remarkable |
~/.remarkable
|
||
renderdocAUR |
~/.renderdoc
|
won't fix | |
Ren'Py |
~/.renpy
|
won't fix | |
SANE |
~/.sane/
|
scanimage creates a .cal file there
|
|
scribus |
~/.scribus
|
||
sdcv |
~/.stardict/
|
[172] | Only workaround is modifying HOME
|
SeaMonkey |
~/.mozilla/
|
[173] | |
simplescreenrecorder |
~/.ssr/
|
[174] | Author seems against this feature. |
Solfege |
|
[175] | |
spacemacs |
|
[176] | |
SpamAssassin |
~/.spamassassin
|
||
spectrwm |
~/.spectrwm
|
||
SQLite |
|
[177] |
$ export SQLITE_HISTORY=$XDG_DATA_HOME/sqlite_history
|
Steam |
|
[178] | 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
|
||
texinfo |
~/.infokey
|
$ info --init-file "$XDG_CONFIG_HOME/infokey"
|
|
TeXmacs |
~/.TeXmacs
|
||
Thunderbird |
~/.thunderbird/
|
[179] | |
tllocalmgr |
~/.texlive
|
||
valeAUR |
~/.vale.ini
|
won't fix |
$ vale --config "$XDG_CONFIG_HOME/vale/config.ini"
|
vim |
|
[180] | Since 7.3.1178 vim will search for ~/.vim/vimrc if ~/.vimrc is not found.
"$XDG_CONFIG_HOME"/vim/vimrc set undodir=$XDG_DATA_HOME/vim/undo set directory=$XDG_DATA_HOME/vim/swap set backupdir=$XDG_DATA_HOME/vim/backup set viewdir=$XDG_DATA_HOME/vim/view set viminfo+='1000,n$XDG_DATA_HOME/vim/viminfo set runtimepath=$XDG_CONFIG_HOME/vim,$VIMRUNTIME,$XDG_CONFIG_HOME/vim/after ~/.profile export VIMINIT='source "$XDG_CONFIG_HOME/vim/vimrc"'
export VIMINIT='if !has('nvim') | source "$XDG_CONFIG_HOME/vim/vimrc" | endif' |
vimperator |
~/.vimperatorrc
|
[181] |
$ export VIMPERATOR_INIT=":source $XDG_CONFIG_HOME/vimperator/vimperatorrc"
|
w3m |
~/.w3m
|
[182] | |
wpa_cli |
~/.wpa_cli_history
|
||
xdg-utils |
~/.gnome
|
[183] | For some reason the script xdg-desktop-menu hard-codes gnome_user_dir="$HOME/.gnome/apps" . This is used by chromium among others.
|
xombrero[dead link 2020-02-26] |
~/.xombrero
|
[184][dead link 2020-02-26] | |
xournalpp |
~/.xournalpp
|
[185] | |
xpdf |
~/.xpdfrc
|
||
YARD |
~/.yard
|
[186] | Would accept Pull Request if anyone want to implement it. |
zenmap nmap |
~/.zenmap
|
[187] [188] | |
zoteroAUR |
~/.zotero ~/Zotero
|
[189] | |
zsh |
|
[190] | 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.
|
Libraries
- JVM
- Java, Kotlin, Clojure, Scala, ...
- directories-jvm
- Go
- go-appdir
- Haskell
- Officially in directory since 1.2.3.0 ab9d0810ce.
- xdg-basedir
- Perl
- File-BaseDir
- perl-file-xdg[dead link 2020-02-26]
- Ruby
- rubyworks/xdg
- Rust
- directories-rs
- rust-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
- GNOME Goal: XDG Base Directory Specification Usage
- Rob Pike: "Dotfiles" being hidden is a UNIXv2 mistake.
- systemd-path(1)
- file-hierarchy(7)
- Grawity's notes on dotfiles.
- Grawity's notes on environment variables.
- ploum.net: Modify Your Application to use XDG Folders.
- The PCGamingWiki attempts to document whether or not Linux PC games follow the XDG Base Directory Specification.