Unix & Linux Stack Exchange is a question and answer site for users of Linux, FreeBSD and other Un*x-like operating systems. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I've noticed that some applications put their configuration files to ~/.config/appname while others use ~/.appname (the classic way, AFAIK) for this. What's the sense in this distinction and what could be better to consider for an application of mine?

UPDATE: Looks like my (XUbuntu 11.10 default) $XDG_CONFIG_HOME is set to ~/ and the most of the applications in my system (like Mozilla Firefox, Adobe Flash Player, Midnight Commander, Opera, Wine, etc.) comply to this. But there are still many applications (like Compiz, Deadbeef, VLC, Qt Creator, Google Chrome, XFCE, etc.) using ~/.config/ instead. Another suspicious thing is that directories in ~/.config/ are not themselves hidden (no dot in their names) - aren't application config dirs expected to have constant own names without depending on the location ($XDG_CONFIG_HOME value)?

share|improve this question

Because those applications that place configuration files in $HOME are ignoring the XDG Base Directory Specification, notably:

There is a single base directory relative to which user-specific configuration files should be written. This directory is defined by the environment variable $XDG_CONFIG_HOME...

If $XDG_CONFIG_HOME is either not set or empty, a default equal to $HOME/.config should be used.
share|improve this answer
Looks like my (XUbuntu 11.10 default) $XDG_CONFIG_HOME is set to ~/, but there are still many applications using ~/.config/ – Ivan Nov 11 '11 at 1:54
This answer is far from complete. Namely, it seems to imply that the specification has been there since day one, and it's just the apps which have ignored it since the beginning. But actually there are quite some apps which have been around for much longer than XDG with its specification. – Ruslan Jun 8 at 7:17

A complement to jasonwryan's great answer, addressing some of your issues:

  • Your $XDG_CONFIG_HOME is not set to ~/. It simply isn't set. So applications that follow the XDG Speciifcation use the default ~/.config

  • The dirs inside /.config are not hidden because they don't have to. The whole point of using a ~/.config dir is to un-clutter the user's $HOME. Since they are already in a separate, hidden dir, there's no need to be hidden inside there.

  • Software that does not follow the spec (unfortunately still the vast majority) use a hidden dir for their settings (like ~/.myapp) as an attempt not to clutter the user's $HOME. It (kinda) works, but it is still a bad approach when, for example, you try to backup your settings and your "big data" (like Pictures, Videos, Music) separately. Having all settings in a single place, without mixing with user's data, is a much better approach

  • As for "having constant names regardless of where XDG_CONFIG_HOME points to" , they already do: it is appname without the leading dot. Remember: the ones using $HOME/.appname are the ones that ignore XDG Spec. They use a hardcoded path.

  • As for your applications, please use the XDG Standard! I beg you, and your users will say thanks for you not cluttering their $HOME any further.

share|improve this answer
Just want to say your answer is most excellent! The conventional wisdom is particularly useful and your points are very well explained :) thanks! – Steve Benner Jan 23 at 12:19

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.