Ubuntu – the relationship between .gconf, .gnome2, .cache, .local, and other dot-file hierarchies in the home directory

configuration-managementdconffilesgconfgnome

According to this answer, .local .cache and .config are, by convention, configuration storage locations adopted by Gnome and Ubuntu.

Are .gnome .gnome2 and .gconf therefore legacy configuration directories, or are they supposed to co-exist?
And does the adoption of dconf alter these dot-file application config conventions?

Finally, what is the relation of the gconf-editor data settings to these directories? Do .gnome/.gconf contain the same info that gconf-editor accesses?

Updates:
XDG has been pointed to as the reason for .cache, .local, and .config.

This question on dconf advises that dconf will be the replacement for gconf,
as documented on Gnome.org .
Furthermore, João says that dconf is the

GNOME technology used to store
application settings. […] dconf is
the GNOME3 replacement for gconf which
has not been maintained for some time.
dconf is also expected to bring
performance improvements over gconf
(relevant for applications startup).

I expect, based on that that there will be a somewhat anarchic migration path from gconf settings to dconf. I would love to hear any additional perspectives.

Best Answer

.local, .cache, and .config are part of the FreeDesktop Base Directory Specification. They should not actually be hard-coded but instead use the environment variables (i.e. $XDG_DATA_HOME, $XDG_CACHE_HOME, and $XDG_CONFIG_HOME). There are GLib and Python wrappers for the spec that may be helpful as well. Here's an example in Python:

>>> import xdg.BaseDirectory
>>> print xdg.BaseDirectory.xdg_data_home
/home/andrew/.local/share
>>> print xdg.BaseDirectory.xdg_config_home
/home/andrew/.config
>>> print xdg.BaseDirectory.xdg_cache_home
/home/andrew/.cache

.gnome and .gnome2 are indeed deprecated and should not be used. These were used by libgnome's gnome-config module.

.gconf does indeed contain the settings that gconf-editor accesses as xml files. For instance, compare the output of the following commands:

gconftool -a /desktop/gnome/applications/browser

cat ~/.gconf/desktop/gnome/applications/browser/%gconf.xml
Related Question