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.
- 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
-
- 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 .
- Where user-specific state 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 .
- 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
XDG_DATA_DIRS- List of directories separated by (analogous to ).
- Should default to .
-
- 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 ), 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 | |||
| Android Studio | ~/.AndroidStudioX.X |
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 | |
| , | edba864 | |||
~/.apvlvrc |
Uses now if it exist. | |||
| aria2 | 8bc1d37 |
XDG_CONFIG_HOME/aria2/ XDG_CACHE_HOME/aria2/ | ||
| 2.9.0 | Uses for and for the other 3 files. Legacy paths are not removed after migration, they have to be deleted manually. | |||
~/.binwalk |
2051757 | XDG_CONFIG_HOME/binwalk | ||
| Blender | 4293f47 | |||
| byobu | 4.17 |
Legacy path takes precedence if present, or if | ||
| 04162d |
XDG_CONFIG_HOME/calcurse XDG_DATA_HOME/calcurse If the legacy path is present, it will take precedence. | |||
~/.ccache |
4.0 |
XDG_CACHE_HOME/ccache XDG_CONFIG_HOME/ccache/ccache.conf | ||
| f7c3193 | ||||
| clangd | fdf7dcc |
Project specific configuration can be specified in | ||
| Composer | 1.0.0-beta1 | |||
| cURL | 7.73.0 | |||
~/.d-feet |
7f6104b | |||
| Dolphin emulator | a498c68 | |||
| 7e777ca | ||||
| 78b6e2b | ||||
| Emacs | ~/.emacs |
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 | ||||
| fontconfig | ~/.fontconfig |
8c255fb, | Use to store fonts instead. | |
| e4c2cc7 | ||||
| freerdp | edf6e72 | |||
| Gajim | 3e777ea | |||
| fc28caa | ||||
| GDB | , ~/.gdb_history |
11.1 | , | |
| GIMP | ||||
| Git | ~/.gitconfig |
0d94427 | ||
| gops | 71c4255 | |||
| gnuplot | a5562b1 | |||
| 3.5 | ||||
| Godot Engine | ~/.godot |
73049d1 | ||
| GStreamer | 4e36f93 | |||
| GTK 3 | ||||
| 3.0.0 | ||||
| 93233a6 | ||||
| httpie | 5af0874 | |||
| i3 | 7c130fb | |||
| , | ||||
| i3-gaps | ||||
| i3status | c3f7fc4 | |||
| 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 | |||
| intellij-idea-community-edition / | 2020.1 |
XDG_CONFIG_HOME/JetBrains/IntelliJIdeaXXXX.X XDG_DATA_HOME/JetBrains/IntelliJIdeaXXXX.X XDG_CACHE_HOME/JetBrains/IntelliJIdeaXXXX.X | ||
| 11162 | ||||
| Kakoune | ||||
| less | ~/.lesshst, |
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 | |||
| d430af6 | ||||
| LibreOffice | ||||
| 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 | ||||
| Mercurial | ~/.hgrc |
. | ||
| msmtp |
af2f409 v1.6.7+ |
. | ||
| 87ab26b | XDG_CACHE_HOME/mesa | |||
| eb487c5 | ||||
| mozc | 91cc1e1 | |||
| mpd | 87b7328 | |||
| mpv | cb250d4 | |||
| mutt | ~/.mutt |
b17cd67 | ||
| cf723b7 | ||||
| nano | c16e79b | |||
| ncmpcpp | ~/.ncmpcpp |
should be set to avoid an file in ~/.ncmpcpp. | ||
| Neovim | ~/.nviminfo |
1ca5646 | ||
| Nestopia UE | 610c008 1.51.0 | |||
| newsbeuter | 3c57824 | It is required to create both directories : | ||
| node-gyp | 2b5ce52a | |||
| 56a1cc2 | ||||
| notmuch | ~/.notmuch-config |
|||
| 4593e72 | does not recognize workarounds for ipython/jupyter | |||
| OfflineIMAP | 5150de5 | |||
| 39559c3 | ||||
| pandoc | 0bed0ab | |||
| PCManFM | 1.3.2 | |||
| Pry | ||||
| python-pylint | 2.10 | Formerly | ||
| 6.0 | ||||
| Still creates according to | ||||
| powershellAUR | 6.0 | |||
| 132fe47 | ||||
| procps-ng | af53e17 | |||
| pacman | 80eca94 | |||
| 2b537d2 | ||||
| PulseAudio | ||||
| pyroomAUR | ||||
| 3.10.0 | ||||
| qutebrowser | ||||
| qtile | Some optional bar widgets can create files and directories in non-compliant paths, but most often these are still configurable. | |||
| 9d36258 | ||||
| retroarch | ||||
| 02e7d41 | ||||
| RSpec | 5e395e2 | |||
| rTorrent | 6a8d332 | |||
| RuboCop | 6fe5956 | |||
| sandboxd | ||||
| scribus | 1.5.3 | |||
| 7d014be | It is required to migrate data by hand.
| |||
| 958ec35 | ||||
~/.Skype |
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 | |||
Cache is placed in XDG_CONFIG_HOME/sublime-text-3/Cache instead of expected . | ||||
| surfraw | ||||
| sway | 614393c | |||
| sxhkd | ||||
| systemd | ||||
~/.teeworlds |
||||
| termite | ||||
| , | 2.2 | directory must exist, writes to otherwise. | ||
| tmux | ~/.tmux.conf |
3.1 | 3.1 introduced and in 3.2 was added | |
| tmuxp | 1.5.0 | Fixed in 1.5.2 | ||
| 2636923 | ||||
| Transmission | ~/.transmission |
b71a298 | ||
| 570b321 | ||||
| Uzbl | c6fd63a | |||
| VirtualBox | 4.3 | |||
| VLC | 16f32e1 | |||
| warsow | 98ece3f | |||
| WeeChat |
XDG_CONFIG_HOME/weechat XDG_CACHE_HOME/weechat XDG_DATA_HOME/weechat | |||
| Wireshark | b0b53fa | |||
| wxWidgets | ||||
| Xsettingsd | b4999f5 | |||
| xmobar | 7b0d6bf | XDG_CONFIG_HOME/xmobar/xmobarrc | ||
| 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 , , and . | ||
~/.xournalpp |
||||
| ee7b481 | ||||
| Zim | e42b8b0 | |||
~/.zo |
0.3.0 |
Partial
| Application | Legacy Path | Supported Since | Discussion | Notes |
|---|---|---|---|---|
, , ~/.conda/condarc.d/, |
||||
| Anki | , | anki -b "$XDG_DATA_HOME"/Anki | ||
| , | , | |||
| aspell | ~/.aspell.conf |
|||
| Atom | ||||
~/.aws |
1.7.45 | , | ||
~/.bashdbinit, ~/.bashdb_hist |
Like documented at , you can specify a file to run commands from. Thus, move the init file to and create an alias . Unfortunately the history file is hardcoded . | |||
| bazaar | , ~/.bzr.log |
2.3.0 | Discussion in upstream bug states that bazaar will use if it exists. The logfile ~/.bzr.log might still be written. | |
| Ruby#Bundler | 2.1.0 |
export BUNDLE_USER_CONFIG="$XDG_CONFIG_HOME"/bundle export BUNDLE_USER_CACHE="$XDG_CACHE_HOME"/bundle export BUNDLE_USER_PLUGIN="$XDG_DATA_HOME"/bundle Is considered as fixed by the environment variables. | ||
| cabal |
export CABAL_CONFIG="$XDG_CONFIG_HOME"/cabal/config export CABAL_DIR="$XDG_CACHE_HOME"/cabal See documentation on environment variables. CABAL_DIR may be put into DATA if you consider downloaded files as such. | |||
| calc |
export CALCHISTFILE="$XDG_CACHE_HOME"/calc_history | |||
| Rust#Cargo | ||||
| cd-bookmark | export CD_BOOKMARK_FILE=$XDG_CONFIG_HOME/cd-bookmark/bookmarks
| |||
| [On master branch, but no release yet] | Set and move the config file to | |||
~/.chezscheme_history |
||||
| Chromium | , | 23057 | ||
| cinelerra | ||||
| conky | 00481ee | |||
~/.claws-mail |
||||
| coreutils | ||||
| crawl | The trailing slash is required:
| |||
|
Despite this, clusterssh will still create . | ||||
| CUDA | ~/.nv |
|||
| dict | ||||
| Docker | ||||
~/.docker/machine |
||||
| DOSBox | ||||
| Electrum Bitcoin Wallet | c121230 | export ELECTRUMDIR="$XDG_DATA_HOME/electrum" | ||
| 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 | ||||
~/.fceux/ |
. Fceux will create directory inside . | |||
| FFmpeg | export FFMPEG_DATADIR="$XDG_CONFIG_HOME"/ffmpeg | |||
| , , | ||||
~/.fzf.bash, ~/.fzf.zsh |
The shell init files will be installed to if the installation script is called with for example . | |||
, , ~/.emscripten_ports, |
, , , | |||
| freecad |
Despite these options, freecad will still create the file as the web module has it hard coded | |||
~/.get_iplayer |
||||
| getmail | ||||
| gnuradio | ||||
| 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 | |||
| Go | ||||
| Google Earth | Some paths can be changed with the and options in | |||
| gopass | Override settings in : | |||
~/gPodder |
sets the download folder. - where config and database files are stored, downloads also if is not set. | |||
| GQ LDAP client | , | 1.51 | , export GQSTATE="$XDG_DATA_HOME"/gq/gq-state, | |
| Gradle | ||||
| GTK 1 | ||||
| GTK 2 | export GTK2_RC_FILES="$XDG_CONFIG_HOME"/gtk-2.0/gtkrc | |||
| Houdini |
The value of this variable must include the substring __HVER__, which will be replaced at run time with the current MAJOR.MINOR version string | |||
| imapfilterAUR | ||||
| IPFS | ||||
| irb | ~/.profile $ export IRBRC="$XDG_CONFIG_HOME"/irb/irbrc | |||
| irssi | ||||
| isync | ||||
| Java#OpenJDK | ~/.java/.userPrefs |
|||
| jupyter | ||||
~/.k9s |
0.20.4 | |||
| KDE | , | |||
| kscriptAUR | ||||
| ledger | , | ledger --init-file "$XDG_CONFIG_HOME"/ledgerrc | ||
| Leiningen | , |
to change the m2 repo location used by leiningen look here: Leiningen#m2_repo_location | ||
export DVDCSS_CACHE="$XDG_DATA_HOME"/dvdcss | ||||
|
Make sure Do not use | ||||
| libx11 | , | export XCOMPOSEFILE="$XDG_CONFIG_HOME"/X11/xcompose, | ||
/etc/lynx.cfg |
||||
|
However, no way to change the location of this configuration file. | ||||
and set <localRepository> as appropriate in settings.xml | ||||
| Mathematica | ||||
export MAXIMA_USERDIR="$XDG_CONFIG_HOME"/maxima | ||||
|
Creates a further | ||||
| , | ||||
| MOC | ~/.moc |
, | ||
~/.bitmonero |
||||
| MPlayer | ||||
~/.mypy_cache |
||||
| 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 | ||||
~/.ncmpc |
||||
| Netbeans | ||||
| Node.js | ~/.node_repl_history |
|||
| , |
is unnecessary (and unsupported) if Node.js is installed by nvmAUR.
If you want to configure this system-wide, the file to edit is , not . You can confirm that the config is loaded by running | |||
export OPAMROOT="$XDG_DATA_HOME/opam"
Both configuration and state data are stored in , so this solution is not fully compliant. | ||||
| Add the line to your . | ||||
| PuTTY | ~/.putty/ |
9952b2d | Will use if it already exists. Creates if not. Prioritises if both exist. Tested in 0.74 | |
| NVIDIA | ~/.nv |
Uses XDG_CACHE_HOME if set, otherwise improperly falls back to ~/.nv instead of ~/.cache. | ||
| nvmAUR | ~/.nvm |
|||
| Octave | , , | ,
The | ||
| 7c3077b0f | Does not fully honour XDG Base Directory Specification, see
Currently it hard-codes . | |||
| OpenSSL | Seeding file 's location can be set with environment variable per FAQ. | |||
| parallel | 20170422 | |||
| pass | ||||
| Pidgin | ~/.purple |
|||
| PostgreSQL | , , , | 9.2 | , export PSQL_HISTORY="$XDG_STATE_HOME/psql_history", ,
It is required to create both directories: | |
| PulseAudio | 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 or . | |||
~/.azure |
||||
export PYTHON_EGG_CACHE="$XDG_CACHE_HOME"/python-eggs | ||||
| , | export PLTUSERHOME="$XDG_DATA_HOME"/racket | |||
| readline | ||||
export RECOLL_CONFDIR="$XDG_CONFIG_HOME/recoll" | ||||
| redis | , | , | ||
| rlwrap | ||||
| Ruby#RubyGems | export GEM_HOME="$XDG_DATA_HOME"/gem,
Make sure to remove from | |||
| Rust#Rustup | export RUSTUP_HOME="$XDG_DATA_HOME"/rustup | |||
sbt -ivy "$XDG_DATA_HOME"/ivy2 -sbt-dir "$XDG_DATA_HOME"/sbt (beware ) | ||||
| SageMath | ||||
| GNU Screen | ||||
~/.ssr/ |
0.4.3 | Will use ONLY if it already was created otherwise defaults to | ||
| spacemacs | , | Move the file.
, Other files need to be configured like Emacs. | ||
| Haskell#Stack | ~/.stack |
|||
| subversion | ||||
| sudo | 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 | ~/texmf, , |
, , | ||
| TeXmacs | ~/.TeXmacs |
|||
| This will still expect the file.
| ||||
| Unison | ~/.unison |
|||
| urxvtd | ~/.urxvt/urxvtd-hostname |
|||
| Vagrant | , | , | ||
| virtualenv | export WORKON_HOME="$XDG_DATA_HOME/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 . You can also run Visual Studio with the flag, such as | |||
| You can run VSCodium with the flag, such as . This however won't prevent the creation of directory. | ||||
| wakatime | , , , |
The directory needs to be created manually | ||
| wget | ~/.wgetrc, |
and add the following as an alias for wget: , 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:
| |||
| xbindkeys | ||||
| xorg-xauth |
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 /etc/X11/Xsession).
Depending on where you have configured your , 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. | ||
~/.yarnrc, , , |
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, , , , , |
In the above config file, some locations can be customized using options like | |
| Ansible | |||
| aMule | |||
| anthy | ~/.anthy |
||
| Apache Directory Studio | |||
| ARandR | |||
| Arduino | , | won't fix | |
|
Specify the new directories used by Arduino CLI in arduino-cli.yaml as mentioned in the documentation here.
| |||
| Audacity | |||
| Avidemux | |||
| Bash | , , , , ~/.bash_logout |
won't fix |
can be sourced from a different location in . Specify |
| Berkshelf | |||
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 .conan/ is created. It was designed to simplify CI, but can be used here too. | |||
| (universial-ctags) | |||
| CUPS | |||
| cVim | ~/.cvimrc |
||
| 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 ) | ||
| Fetchmail | |||
| Firefox | ~/.mozilla/ |
||
| Flatpak | won't fix | ||
| freesweep | |||
~/.gftp/ |
Following the XDG spec is planned for gftp. | ||
| GoldenDict | |||
| 2022 Support XDG base directory specification (for next release Gramps 5.2 ) - Patch https://github.com/gramps-project/gramps/pull/1368 | |||
~/.groovy/ |
|||
| gtk-recordMyDesktop | ~/.gtk-recordmydesktop |
||
| idris | |||
| won't fix | You can move the Game install location in the app settings. | ||
| lbdbAUR | |||
| llpp | Added in 3ab86f0 but subsequently reverted in e253c9f1 | ||
| Java OpenJDK | |||
| Java OpenJFX | |||
~/.jgmenu-lockfile |
|||
| julia | , , | The trailing is necessary. See | |
| kiteAUR | |||
| Kodi | #6142 | PR abandoned in 2016 | |
| Related Konan issue: | |||
| Kubernetes | |||
~/.mozilla
|
|||
| Linux PAM | Hardcoded in modules/pam_env/pam_env.c | ||
| lldb | , | ||
| LMMS | |||
| mathomatic | ~/.mathomaticrc, |
History can be moved by using with the environment set appropriately. | |
| Minecraft | won't fix | ||
| Minetest | won't fix | ||
~/.minirc.dfl |
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 (), s-nail (), etc. While some of them offer alternative configurable locations, many do not such as w3m, wget and lftp. | ||
| nmcli | Hardcoded to g_get_home_dir() | ||
| Networkmanager-openvpn | |||
| There's an open PR to move to | |||
| OpenSSH | won't fix | Assumed to be present by many ssh daemons and clients such as DropBear and OpenSSH. | |
| palemoon | |||
| parsec-binAUR | |||
| A flag exists, but can only be set relative to . | |||
| perf | Hardcoded in tools/perf/util/config.c. Commit: | ||
| perl | ~/.cpan, |
Perl5's CPAN expects ~/.cpan | |
| various shells and display managers | |||
| python | ~/.python_history |
All history from interactive sessions is saved to ~/.python_history 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. | |
| The issues is for module | |||
| Qt Designer | ~/.designer |
||
| RedNotebook | |||
| Remarkable | |||
| won't fix | |||
| Ren'Py | won't fix | ||
| repo | ~/.repoconfig |
||
| SANE | creates a file there | ||
/etc/sbclrc (require :asdf)
(setf sb-ext:*userinit-pathname-function*
(lambda () (uiop:xdg-config-home #P"sbcl/sbclrc")))
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 | ||
| Snap | |||
| Solfege | , ~/.solfegerc, |
||
| SpamAssassin | |||
| SQLite | , | , sqlite3 -init "$XDG_CONFIG_HOME"/sqlite3/sqliterc | |
| 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. | |
| TeamSpeak | |||
| terraform | |||
| Thunderbird | |||
| TigerVNC | ~/.vnc |
||
| tllocalmgr | |||
| Use fork instead. The fork will use | |||
| valeAUR | won't fix | ||
| vim | , , | Since 7.3.1178 vim will search for if 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 viewdir=$XDG_DATA_HOME/vim/view | call mkdir(&viewdir, 'p')
set backupdir=$XDG_CACHE_HOME/vim/backup | call mkdir(&backupdir, 'p')
set directory=$XDG_CACHE_HOME/vim/swap | call mkdir(&directory, 'p')
set undodir=$XDG_CACHE_HOME/vim/undo | call mkdir(&undodir, '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 | |||
| visidata | |||
| wpa_cli | |||
| x2goclientAUR | |||
~/.gnome |
For some reason the script 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. | ||
| 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. | |||
~/.zotero |
|||
| zsh | , , , , ~/.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.
/!\ The folder needs to exist |
Libraries
- C++
- xdg-utils-cxx
- xdgpp
- Go
- go-appdir
- 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
- rubyworks/xdg
- Rust
- directories-rs
- rust-xdg
- Vala
- Builtin support via GLib.Environment.
- See , , , etc.
See also
- GNOME Goal: XDG Base Directory Specification Usage
- Rob Pike: "Dotfiles" being hidden is a UNIXv2 mistake.
- systemd-path(1)
- 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.