XDG Base Directory

This article summarizes the XDG Base Directory specification in #Specification and tracks software support in #Support.

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.

See Environment variables#Globally for information on defining variables.

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.
    • Where user-specific data files should be written (analogous to ).
    • Should default to .
    • Where user-specific state files should be written (analogous to /var/lib).
    • Should default to $HOME/.local/state.
  • 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 .
    • 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.
    • pam_systemd sets this to .

System directories

    • List of directories separated by (analogous to ).
    • Should default to /usr/local/share:/usr/share.
    • List of directories separated by (analogous to ).
    • Should default to .

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 error prone or difficult, it should also be classified 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
ALSA 577df36

1.2.3

Android Studio Android Studio 4.1
XDG_CONFIG_HOME/Google/AndroidStudioX.X
XDG_DATA_HOME/Google/AndroidStudioX.X
XDG_CACHE_HOME/Google/AndroidStudioX.X

Location overview by Google does not mention XDG - paths could be hardcoded instead of using the proper variable, though that is unlikely as Intellij IDEA, which Android Studio is based on, implements it properly as well

Anki , Uses as default if no older location exists, can be changed by using
antimicroxAUR ~/.antimicro, edba864
Uses now if it exist.
aria2 8bc1d37
XDG_CONFIG_HOME/aria2/
XDG_CACHE_HOME/aria2/
~/.asunder_album_genre 2.9.0 Uses XDG_CONFIG_HOME/asunder/asunder for and for the other 3 files. Legacy paths are not removed after migration, they have to be deleted manually.
3.2.0
XDG_CONFIG_HOME/audacity
XDG_DATA_HOME/audacity
2051757
bitwarden-cli 1.7.1
XDG_CONFIG_HOME/Bitwarden CLI
XDG_DATA_HOME/audacity

The environment variable takes precedence.

Currently contains a single data.json file with all the vault data, so it ought to belong in

Blender 4293f47
4.17

Legacy path takes precedence if present, or if XDG_CONFIG_HOME is not set.

cabal 9f7dc55
calcurse 04162d
XDG_CONFIG_HOME/calcurse
XDG_DATA_HOME/calcurse

If the legacy path is present, it will take precedence.

4.0
XDG_CACHE_HOME/ccache
XDG_CONFIG_HOME/ccache/ccache.conf
citra-gitAUR f7c3193
clangd fdf7dcc

XDG_CACHE_HOME/clangd

Project specific configuration can be specified in . Configuration is combined when this is sensible. In case of conflicts, user config has the highest precedence, then inner project, then outer project.

Composer 1.0.0-beta1
cURL 7.73.0
7f6104b
Dolphin emulator ~/.dolphin-emu a498c68
7e777ca XDG_CONFIG_HOME/dr14tmeter/
78b6e2b
Emacs

27.1

Legacy paths have precedence over XDG paths. Emacs will never create . Workaround for 26.3 or older: It's possible to set , but it has unexpected side effects.

fish
7308bcd Only supported in version 1.4.0, which hasn't been released yet (as of 9-July-2022)
fontconfig ~/.fonts 8c255fb, Config goes in or XDG_CONFIG_HOME/fontconfig/conf.d/, fonts are stored in
e4c2cc7

e7e2994ba

0.20.0

Defaults to
XDG_CONFIG_HOME/FreeCAD
XDG_DATA_HOME/FreeCAD
XDG_CACHE_HOME/FreeCAD

legacy path can be used with

~/.freerdp edf6e72
Gajim 3e777ea
fc28caa
GDB ~/.gdbinit, 11.1 ,
GIMP

60e0cfe 483505f

Git ~/.gitconfig 0d94427
gops 71c4255
gnuplot a5562b1

3.5
Godot Engine 73049d1

3.0-stable

GStreamer 4e36f93
GTK 3
helm 3.0.0
htop 93233a6
5af0874
i3 7c130fb
,
i3-gaps
c3f7fc4
i3status-rust
Inkscape ~/.inkscape 0.47
ipython 8.0.0 The default dotfile path is still $HOME but xdg directories (or ~/.config/ipython if XDG_* vars are unset) are supported and work correctly.
iwd / iwctl d3e00d7f
/ 2020.1
XDG_CONFIG_HOME/JetBrains/IntelliJIdeaXXXX.X
XDG_DATA_HOME/JetBrains/IntelliJIdeaXXXX.X
XDG_CACHE_HOME/JetBrains/IntelliJIdeaXXXX.X
11162
jupyter ~/.jupyter opt-in in 5.0, opt-out in 6.0, compulsory in 7.0 (changelog) XDG_CONFIG_HOME/jupyter
Kakoune
~/.keynavrc XDG_CONFIG_HOME/keynav/keynavrc
less , 590

full support in 600

The environment variables XDG_CONFIG_HOME and must be set in version 590. This is no longer necessary when version 600 lands.
latexmk (in )
~/.lftp 21dc400
lgogdownloaderAUR d430af6
LibreOffice

a6f56f7 25bd2ee

cd16cdd
XDG_CONFIG_HOME/luarocks
XDG_CACHE_HOME/luarocks

If the legacy path is present, it will take precedence.

NSS 3.42
Streamlink ea80591
mc

1b99570 0b71156 ce401d7

Mercurial

3540200 4.2

XDG_CONFIG_HOME/hg/hgrc.
msmtp

af2f409 v1.6.7+

XDG_CONFIG_HOME/msmtp/config.
87ab26b
eb487c5
mozc ~/.mozc 91cc1e1
mpd 87b7328
mpv cb250d4
mutt b17cd67
~/.mypaint cf723b7
nano c16e79b
ncmpcpp

38d9f81 27cd86e

should be set to avoid an file in .
Neovim ~/.nvim 1ca5646

Nestopia UE 610c008 1.51.0
newsboat ~/.newsboat 3c57824 It is required to create both directories :
node-gyp 2b5ce52a
56a1cc2
notmuch mkdir -p $XDG_CONFIG_HOME/notmuch/default; mv ~/.notmuch-config $XDG_CONFIG_HOME/notmuch/default/config
4593e72 does not recognize workarounds for ipython/jupyter
OfflineIMAP 5150de5
~/.opentyrian 39559c3
6bc2d3f

ebcf3de

github.com/openSUSE/osc/pull/940

github.com/osc/pull/940

Legacy path takes precedence if it exists

ad52dd8 XDG_CONFIG_HOME/Yubico/u2f_keys
0bed0ab
PCManFM 1.3.2
pcsx2

87f1e8f a9020c6 3b22f0f 0a012ae

Pry

a0be0cc7 15e1fc92 e9d1be0e

~/.pylint.d 2.10 Formerly , global config still needs:
~/.pip 6.0
Still creates according to
6.0
132fe47
procps-ng af53e17

pacman 80eca94
2b537d2
poezioAUR
PulseAudio

59a8618 87ae830 9ab510a 4c195bc

~/.quodlibet 3.10.0
qutebrowser
qtile

fd8686e 66d704b 51cff01

Some optional bar widgets can create files and directories in non-compliant paths, but most often these are still configurable.
9d36258
02e7d41
RSpec 5e395e2
rTorrent 6a8d332
RuboCop ~/.rubocop.yml 6fe5956
Ruby#RubyGems 3.0.0 (5c6269c)
XDG_CONFIG_HOME/gemrc
XDG_CONFIG_HOME/irb
XDG_DATA_HOME/gem
XDG_DATA_HOME/rdoc
sandboxd XDG_CONFIG_HOME/sandboxd/sandboxrc
1.5.3
7d014be It is required to migrate data by hand.

mv ~/.scummvm "$XDG_DATA_HOME"/scummvm/saves

~/.stardict/ 958ec35
8.0
93b5f11 By default, the configuration file is left blank with intention that the user will fill it at their will (through the gui or manually).
spectrwm a30bbb
build 4105 Prior to build 4105, the cache was placed in XDG_CONFIG_HOME/sublime-text-3/Cache.
surfraw

3e4591d bd8c427 f57fc71

sway 614393c
sxhkd
systemd
teeworlds
termite
, 2.2 ~/.local/share/tig directory must exist, writes to otherwise.
tmux 3.1 3.1 introduced and in 3.2 was added
tmuxp 1.5.0 Fixed in 1.5.2
2636923
Transmission b71a298
util-linux 570b321
Uzbl c6fd63a
VirtualBox 4.3
~/.vis

68a25c7 d138908

VLC 16f32e1
98ece3f
WeeChat

3.2

XDG_CONFIG_HOME/weechat
XDG_CACHE_HOME/weechat
XDG_DATA_HOME/weechat
Wireshark b0b53fa
wxWidgets
Xsettingsd b4999f5
xmobar ~/.xmobarrc 7b0d6bf

9fc6b37 eaccf70

xmonad 40fc10b

All of these must exist, otherwise it gives up and falls back to for each:
XDG_CACHE_HOME/xmonad
XDG_CONFIG_HOME/xmonad
XDG_DATA_HOME/xmonad

Alternatively, it always respects , XMONAD_CONFIG_DIR, and .

20db937f 1.1.0

ee7b481
Zim e42b8b0
zoxide 0.3.0

Partial

Application Legacy Path Supported Since Discussion Notes
~/.conda/.condarc, , , export CONDARC="$XDG_CONFIG_HOME/conda/condarc"
, export ASDF_CONFIG_FILE="${XDG_CONFIG_HOME}/asdf/asdfrc",
aspell
Atom ~/.atom
1.7.45 ,
export BASH_COMPLETION_USER_FILE="$XDG_CONFIG_HOME"/bash-completion/bash_completion
Like documented at , you can specify a file to run commands from. Thus, move the init file to and create an alias alias bashdb='bashdb -x ${XDG_CONFIG_HOME:-$HOME/.config}/bashdb/bashdbinit'. Unfortunately the history file is hardcoded .
bazaar , 2.3.0 Discussion in upstream bug states that bazaar will use if it exists. The logfile might still be written.
btpd -d "$XDG_DATA_HOME"/.btpd
export CALCHISTFILE="$XDG_CACHE_HOME"/calc_history
Rust#Cargo ~/.cargo
0.D-1 partial support due to required compile time option
cd-bookmark export CD_BOOKMARK_FILE=$XDG_CONFIG_HOME/cd-bookmark/bookmarks

or use the fork that has native XDG support:

[On master branch, but no release yet] Set and move the config file to
petite --eehistory "$XDG_DATA_HOME"/chezscheme/history
Chromium , 23057

cinelerra
conky ~/.conkyrc 00481ee
coreutils
crawl ~/.crawl The trailing slash is required:
clusterssh

Despite this, clusterssh will still create .

CUDA export CUDA_CACHE_PATH="$XDG_CACHE_HOME"/nv
dict
Docker export DOCKER_CONFIG="$XDG_CONFIG_HOME"/docker
DOSBox dosbox -conf "$XDG_CONFIG_HOME"/dosbox/dosbox.conf
v1.30.0-beta.1 Dub uses the directory for both user settings and caching downloaded packages. The directory can only be moved as a whole, using .
Electrum Bitcoin Wallet ~/.electrum c121230
ELinks
afaf889 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.
Elm ~/.elm
~/.fceux/ . Fceux will create .fceux directory inside .
FFmpeg
, ,
The shell init files will be installed to if the installation script is called with for example /usr/local/opt/fzf/install --xdg.
, , ~/.emscripten_ports, , , ,
get_iplayerAUR
getmail
~/.ghci Supported upstream from 9.4.1 , but as of 2022-09-24 Arch package is 9.0.2 and not yet up-to-date.

The environment variable GHCUP_USE_XDG_DIRS can be set to any non-empty value. See .

GnuPG export GNUPGHOME="$XDG_DATA_HOME"/gnupg,

Note that this currently does not work out-of-the-box using systemd user units and socket-based activation, since the socket directory changes based on the hash of . You can get the new socket directory using and have to modify the systemd user units to listen on the correct sockets accordingly.

Go ~/go
Google Earth Some paths can be changed with the and options in
Override settings in ~/.config/gopass/config.yml:
GPODDER_DOWNLOAD_DIR sets the download folder. - where config and database files are stored, downloads also if GPODDER_DOWNLOAD_DIR is not set.
GQ LDAP client , 1.51 , , mkdir -p "$(dirname "$GQSTATE")"
Gradle
GTK 1
GTK 2 ~/.gtkrc-2.0
Houdini ~/houdiniMAJOR.MINOR)

The value of this variable must include the substring , which will be replaced at run time with the current version string.

IPFS ~/.ipfs
irb
"$XDG_CONFIG_HOME"/irb/irbrc
IRB.conf[:SAVE_HISTORY] ||= 1000
IRB.conf[:HISTORY_FILE] ||= File.join(ENV["XDG_DATA_HOME"], "irb", "history")
irssi
isync
Java#OpenJDK
jupyter ~/.jupyter 5.0.0rc0 < v5.0.0:

export JUPYTER_CONFIG_DIR="$XDG_CONFIG_HOME"/jupyter

v5.0.0 <= < v6.0.0:

(see )
>= v6.0.0: full support (via ) enabled by default
0.20.4 export K9SCONFIG="$XDG_CONFIG_HOME"/k9s
KDE ,
keychain --absolute --dir "$XDG_RUNTIME_DIR"/keychain
~/.kscript
ledger ,
Leiningen , ~/.m2

to change the m2 repo location used by leiningen look here: Leiningen#m2_repo_location

~/.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 , ,
ltrace
export LYNX_CFG_PATH="$XDG_CONFIG_HOME"/lynx.cfg
m17n-db
/opt/maptool/lib/app/MapTool.cfg
[JavaOptions]
-DMAPTOOL_DATADIR=.local/share/maptool-rptools

However, no way to change the location of this configuration file.

~/.m2 and set as appropriate in settings.xml
Mathematica
~/.maxima
export MEDNAFEN_HOME="$XDG_CONFIG_HOME"/mednafen

Creates a further directory in for whatever reason.

mitmproxy ,
MOC mocp -M "$XDG_CONFIG_HOME"/moc,
export MOST_INITFILE="$XDG_CONFIG_HOME"/mostrc
MPlayer
mypy
MySQL , ,
only supported for mysql-server, not mysql-client 
unsupported
mysql-workbench You can run MySQL Workbench with the flag, such as . The directory needs to be created manually, since MySQL Workbench default location is .
ncurses Precludes system path searching:

,

n export N_PREFIX=$XDG_DATA_HOME/n
Netbeans
Node.js export NODE_REPL_HISTORY="$XDG_DATA_HOME"/node_repl_history
, export NPM_CONFIG_USERCONFIG=$XDG_CONFIG_HOME/npm/npmrc
is unnecessary (and unsupported) if Node.js is installed by .

If you want to configure this system-wide, the file to edit is , not . You can confirm that the config is loaded by running

opam

Both configuration and state data are stored in , so this solution is not fully compliant.

pnpmAUR Add the line to your .
PuTTY 9952b2d Will use if it already exists. Creates if not. Prioritises if both exist. Tested in 0.74
nuget
NVIDIA Uses XDG_CACHE_HOME if set, otherwise improperly falls back to instead of .
~/.nvidia-settings-rc
Octave , ~/.octave_packages, ,

The option must be given an absolute path.

~/.OpenSCAD 7c3077b0f Does not fully honour XDG Base Directory Specification, see

Currently it hard-codes .

OpenSSL Seeding file 's location can be set with RANDFILE environment variable per FAQ.
20170422
pass
Pidgin pidgin --config="$XDG_DATA_HOME"/purple
PostgreSQL , , , 9.2 export PSQLRC="$XDG_CONFIG_HOME/pg/psqlrc", , ,

It is required to create both directories:

PulseAudio Very likely generated by the 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 .
export PYENV_ROOT=$XDG_DATA_HOME/pyenv
export GRIPHOME="$XDG_CONFIG_HOME/grip"
, export PLTUSERHOME="$XDG_DATA_HOME"/racket
nodenvAUR
readline
export RECOLL_CONFDIR="$XDG_CONFIG_HOME/recoll"
redis , , export REDISCLI_RCFILE="$XDG_CONFIG_HOME"/redis/redisclirc
ruby-solargraphAUR
Rust#Rustup
sbt (beware )
SageMath
GNU Screen ~/.screenrc
0.4.3

Will use ONLY if it already was created otherwise defaults to ~/.ssr
spacemacs , Move the file.

,

Other files need to be configured like Emacs.

Haskell#Stack ~/.stack
, (v0.2.0), (v0.45.0) export STARSHIP_CONFIG="$XDG_CONFIG_HOME"/starship.toml,
subversion
~/.sudo_as_admin_successful 1.9.6 Only present when activated at compile-time (default none). An admin_flag parameter can be used in /etc/sudoers since 1.9.6.
, Fully supported in version 2.6 (note $XDG_CONFIG_HOME/task/taskrc must exist, otherwise taskwarrior will offer to create sample config in legacy $HOME/.taskrc location, even if $XDG_CONFIG_HOME is set )
Local TeX Live TeXmf tree, TeXmf caches and config , , ~/.texlive/texmf-config , ,
TeXmacs ~/.TeXmacs
This will still expect the file.
ruby-travisAUR
export UNCRUSTIFY_CONFIG="$XDG_CONFIG_HOME"/uncrustify/uncrustify.cfg
Unison
urxvtd export RXVT_SOCKET="$XDG_RUNTIME_DIR"/urxvtd
Vagrant , ,
virtualenv ~/.virtualenvs
Visual Studio Code You can use , which is not documented and might break unexpectedly.

Setting this makes the editor look for the contents of in $VSCODE_PORTABLE/user-data.

You can also run Visual Studio with the flag, such as . This is documented and probably will not break as unexpectedly, as it is .

You can run VSCodium with the flag, such as . This however won't prevent the creation of ~/.vscode-oss/ directory.
, , ~/.wakatime.db,

The directory needs to be created manually

wget , and add the following as an alias for wget: wget --hsts-file="$XDG_CACHE_HOME/wget-hsts", or set the variable with an absolute path as wgetrc does not support environment variables:
wine Winetricks uses XDG-alike location below for WINEPREFIX management:

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

xbindkeys
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 SLiM has hardcoded.

The SDDM Xauthority path can be changed in its own configuration files as shown below. Unfortunately, it is relative to the home directory.

xinit , , 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:

, Ultimately you should be using and since these resources are loaded via xrdb you can specify a path such as .
Xorg , , , These can be added as part of your Xorg init script () or Xsession start script (which will often be based on ).

Depending on where you have configured your $XDG_CACHE_HOME, you made need to expand the paths yourself. Unlike most other examples in this table, actual X11 init scripts will vary a lot between installations.

export _Z_DATA="$XDG_DATA_HOME/z"
, , , 2d454b5 alias yarn='yarn --use-yarnrc "$XDG_CONFIG_HOME/yarn/config"'

Hardcoded

Application Legacy Path Discussion Notes
adb & Android Studio Despite appearances otherwise, adb will always generate , though it will try keys in as well.
alpine , ~/.addressbook, , , ~/.mailcap, ,

In the above config file, some locations can be customized using options like and .

Ansible
aMule ~/.aMule
anthy
Apache Directory Studio
ARandR ~/.screenlayout
Arduino , won't fix

Specify the new directories used by Arduino CLI in arduino-cli.yaml as mentioned in the documentation here.

Avidemux ~/.avidemux6
Bash , , , , ~/.bash_logout won't fix
can be sourced from a different location in .

Specify as an alternative to for interactive shells.

Berkshelf
chattyAUR
Used for the user package registry ~/.cmake/packages/<package>, detailed in and the Package registry wiki page. Looks like it's hardcoded, for example in cmFindPackageCommand.cxx.
Cinnamon
will set the directory in which is created. It was designed to simplify CI, but can be used here too.
cryptomatorAUR
(universial-ctags) ~/.ctagsrc, .ctags.d
CUPS
cVim
darcs
,
dbus Consider using dbus-broker, as it does not create or use this directory.
Hardcoded here
Dia
dropbox ~/.dropbox/
Eclipse Option overrides but must be added to rather than command line which means you must have write access to . (Arch Linux hard-codes in /usr/bin/eclipse)
Fetchmail
Firefox
Flatpak won't fix
freesweep
~/.gftp/ Following the XDG spec is planned for gftp.
GoldenDict
gphoto2
2022 Support XDG base directory specification (for next release Gramps 5.2 ) - Patch https://github.com/gramps-project/gramps/pull/1368
grsync
gtk-recordMyDesktop ~/.gtk-recordmydesktop
idris
~/.itch won't fix You can move the Game install location in the app settings.
Jmol
~/.lbdbrc, ~/.lbdb/
llpp Added in 3ab86f0 but subsequently reverted in e253c9f1
Java OpenJDK
Java OpenJFX
julia , ~/.julia_history, The trailing is necessary. See
kiteAUR
Related Konan issue:
Kubernetes

~/.librewolf

lldb ,
LMMS
mathomatic ~/.mathomaticrc, History can be moved by using with the environment set appropriately.
Minecraft won't fix
Minetest won't fix
minicom Upstream has a TODO entry for supporting configuration files under .
Mono
mongodb , This Stack Overflow thread suggests a partial workaround using command-line switch .
~/.netrc Like , many programs expect this file to be here. These include projects like curl (), ftp (NETRC), s-nail (NETRC), etc. While some of them offer alternative configurable locations, many do not such as w3m, wget and lftp.
nmcli Hardcoded to
Networkmanager-openvpn
There's an open PR to move to $XDG_CACHE_HOME
OpenSSH won't fix Assumed to be present by many ssh daemons and clients such as DropBear and OpenSSH.
palemoon
parsec-binAUR
~/.pcsxr A flag exists, but can only be set relative to ~/.pcsxr.
perf Hardcoded in tools/perf/util/config.c. Commit:
perl , Perl5's CPAN expects
various shells and display managers
psensor
python All history from interactive sessions is saved to by default since version 3.4. This can still be customized the same way as in older versions (see this example), including to use a custom path or disable history saving.

PYTHONPYCACHEPREFIX: PYTHONUSERBASE: export $XDG_DATA_HOME/python

The issues is for module
Qt Designer
RedNotebook ~/.rednotebook
Remarkable
won't fix
Ren'Py ~/.renpy won't fix
repo
rpm Backlog Workaround is to use --rcfile and --macros however this come with sideeffects.
SANE creates a file there
sbcl

Note that this requires root privileges and will change the location of for all users. This can be mitigated by checking for an existing inside the form.

SeaMonkey
Signal Desktop Currently keeps messages in ~/.config/Signal
Snap
Solfege , ,
SpamAssassin ~/.spamassassin
SQLite , ,
Steam , , 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.
python-streamlitAUR
TeamSpeak export TS3_CONFIG_DIR="$XDG_CONFIG_HOME/ts3client"
Thunderbird
TigerVNC ~/.vnc
tllocalmgr
~/.urlview Use fork instead. The fork will use
won't fix
vim , ~/.vimrc, Since 7.3.1178 vim will search for if ~/.vimrc is not found.
"$XDG_CONFIG_HOME"/vim/vimrc
set runtimepath^=$XDG_CONFIG_HOME/vim
set runtimepath+=$XDG_DATA_HOME/vim
set runtimepath+=$XDG_CONFIG_HOME/vim/after

set packpath^=$XDG_DATA_HOME/vim,$XDG_CONFIG_HOME/vim
set packpath+=$XDG_CONFIG_HOME/vim/after,$XDG_DATA_HOME/vim/after

let g:netrw_home = $XDG_DATA_HOME."/vim"
call mkdir($XDG_DATA_HOME."/vim/spell", 'p')

set backupdir=$XDG_STATE_HOME/vim/backup | call mkdir(&backupdir, 'p')
set directory=$XDG_STATE_HOME/vim/swap   | call mkdir(&directory, 'p')
set undodir=$XDG_STATE_HOME/vim/undo     | call mkdir(&undodir,   'p')
set viewdir=$XDG_STATE_HOME/vim/view     | call mkdir(&viewdir,   'p')

if !has('nvim') | set viminfofile=$XDG_STATE_HOME/vim/viminfo | endif
environment variable will also affect Neovim. If separate configs for Vim and Neovim are desired then the following will be a better choice:
export GVIMINIT='let $MYGVIMRC = !has("nvim") ? "$XDG_CONFIG_HOME/vim/gvimrc" : "$XDG_CONFIG_HOME/nvim/init.gvim" | so $MYGVIMRC'
export VIMINIT='let $MYVIMRC = !has("nvim") ? "$XDG_CONFIG_HOME/vim/vimrc" : "$XDG_CONFIG_HOME/nvim/init.vim" | so $MYVIMRC'
vimperator
w3m
wpa_cli
~/.wegorc
For some reason the script xdg-desktop-menu hard-codes . This is used by chromium among others. Bug discussion has moved to gitlab and PR with fix exists, however it is not merged yet.
For the directory , you may consider editing and modifying the section [Chansrv] following the example config.
XVim2
YARD Would accept Pull Request if anyone want to implement it.
zenmap nmap
Unrecommended: setting the following variable moves the contents of .zoom but the directory itself always gets created. Moreover, it breaks some functionalities eg. being able to start a meeting.
zsh , ~/.zprofile, , , ~/.zlogout, , , Consider exporting in (this is hardcoded due to the bootstrap problem). You could also add this to and avoid the need for any dotfiles in your . Doing this however requires root privilege which may not be viable and is system-wide.

export HISTFILE="$XDG_STATE_HOME"/zsh/history

 /!\ The folder needs to exist

Libraries

C
libXDGdirs
libxdg-basedir
C99: Cloudef's simple implementation.
C++
xdg-utils-cxx
xdgpp
Go
adrg/xdg
go-appdir (deprecated, archived)
configdir (deprecated, abandoned)
kyoh86/xdg (deprecated, archived)
Haskell
Officially in directory since 1.2.3.0 ab9d0810ce.
xdg-basedir
JVM
Java, Kotlin, Clojure, Scala, ...
directories-jvm
Perl
File-BaseDir
Python
pyxdg
Ruby
bkuhlmann/xdg
rubyworks/xdg (deprecated, abandoned)
Rust
directories-rs
rust-xdg
Vala
Builtin support via GLib.Environment.
See , get_user_data_dir, , etc.

See also

This article is issued from Archlinux. The text is licensed under Creative Commons - Attribution - Sharealike. Additional terms may apply for the media files.