Aigars Mahinovs mentioned

that it would be nice if applications would not clutter the home directory with their config files as much.

I agree a lot. Dotfiles for configuration suck badly.

If you start a new application (or if you are in an early stage and have a small userbase), please follow the Freedesktop.org XDG base directory specification.

I.e. use .config/applicationname instead of .applicationname for configuration files (unless an overriding environment variable is set), and .local/share/applicationname for data files. And for cache files, use .cache/applicationname (anyone writing a patch for firefox?)

What I’d also like to propose is to reduce the number of different configuration file syntaxes. It sucks having to find out which syntax an application uses again and again, because every application is different.

We probably won’t be able to convince everybody on one format, but we could maybe cut it down to, like 3 formats, please? There is no reason that one application needs to start comments with “#” and another with “;” while a third application uses “//” but doesn’t allow “/* comment */”…

A small set of syntaxes (preferrably with standardized parsers) should be good enough for just about every application:

  • key=value pairs, quotations optional, comments match “^\s*#”
  • ini-style configuration files with limited nesting
  • JSON syntax (nesting, all strings quoted)
  • XML files (arbitrary nesting, mixed contents, repeated elements)

If we had just these few syntaxes and an appropriate schema description language, we could write generic configuration file editors. That would be very nice. Also we avoid having config file parser bugs by using libraries, and if someone prefers using e.g. gconf or dconf, this could be handled by the library, transparently for the application.

(Note that many application lack error handling when writing their configuration files, especially when the disc is full… - they really should be using a library. IIRC xchat also has some bugs of this kind, I remember having tried to patch some of them once when we were preparing for the sarge release, just to find out that there might be many more of them…)