{{Note|On Arch systems, only {{ic|XDG_RUNTIME_DIR}} is set by default (see below): it is up to the user to [[define]] the other variables, see {{Bug|31204}} and [https://lists.archlinux.org/pipermail/arch-general/2013-February/032980.html].}}

===User directories===

===User directories===

Line 34:

Line 32:

* {{ic|XDG_RUNTIME_DIR}}

* {{ic|XDG_RUNTIME_DIR}}

** Used for non-essential, user-specific data files such as sockets, named pipes, etc.

** 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. {{Note|This variable is already set by [http://www.freedesktop.org/software/systemd/man/pam_systemd.html pam_systemd] ({{ic|/run/user/$UID}} with {{Pkg|systemd}} 228).}}

+

** 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 {{ic|0700}}.

** Must be owned by the user with an access mode of {{ic|0700}}.

** Filesystem fully featured by standards of OS.

** Filesystem fully featured by standards of OS.

Revision as of 12:00, 4 January 2016

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.

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.

~/.profile

Used by the various shells and display managers, this file is expected to be here much like ~/.netrc.

Contributing

When contributing make sure to use the correct section.

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

The first column should be the project name, ideally the command name if it is not ambigious, linked to their website or an appropriate internal wiki article.

The second column is for any legacy files and directories the project had, this is done so people can find them even if they are no longer read.

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.

Finally include any appropriate workarounds or solutions for unsupported projects. Be terse, this article assumes intelligence and good charity from the reader. If something is unclear then feel free to expend some explanation to clarify it.

Lastly, and this goes without saying, please verify that your solution is correct and functional.

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.

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

~/.vim/vimrc

set undodir=~/.cache/vim/undo " vim will not create this directory.
set directory=~/.cache/vim/swap " vim will not create this directory.
set backupdir=~/.cache/vim/backup " vim will not create this directory.
set viminfo+=n~/.cache/vim/viminfo

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)

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.

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.