Take the 2-minute tour ×
Ask Ubuntu is a question and answer site for Ubuntu users and developers. It's 100% free, no registration required.

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.

share|improve this question
add comment

2 Answers

up vote 13 down vote accepted

.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
share|improve this answer
    
I came across your answer when trying to find how to find the configuration directory from a gtk application. For other programmers who come after me there is a gtk(glib) wrapper which uses XDG on Linux and also handles MS Windows. Specific information here: developer.gnome.org/glib/2.30/… –  teambob Feb 17 '12 at 8:34
    
Right you are. I was mostly just being descriptive in this answer, not providing hands on examples for a programmer. I'll update the answer to add a little more info for those who stumble across this. –  andrewsomething Feb 17 '12 at 16:04
add comment

The proper phrasing should be that .local, .cache, etc are part of the XDG Base Directory Specification of FreeDesktop, http://standards.freedesktop.org/basedir-spec/basedir-spec-latest.html.

The XDG Base Directory Specification is a standard, and is followed by KDE and other compliant environments.

share|improve this answer
    
What does it mean to be compliant? Is there a mandate to convert apps using a different specification to the XDG one, or otherwise to leave them out of the Gnome/KDE base install? If so, is the mandate enforced? Are non-compliant third-party apps flagged by someone, or is the existence of different config conventions/dirs assumed to be a given, that is, something that will continue until voluntarily abandoned by all ecosystem developers? I don't have KDE installed, but base Ubuntu/Gnome for my 10.10 system has the XDG dirs you mention. Perhaps this is voluntary compliance? –  belacqua Jan 20 '11 at 4:02
2  
For the most part it is voluntary compliance, but there has been discussion in the past about making XDG compliance a "goal" for all application in the default install. –  andrewsomething Jan 21 '11 at 4:10
1  
It is voluntary compliance, but users can (and many do) fill bug reports on non-compliant apps requesting them to adhere to the standard. Un-cluttering their $HOME folder is one of the greatest benefits of the XDG standard, so user pressure is usually quite high on legacy apps. –  MestreLion Sep 11 '12 at 20:21
add comment

Your Answer

 
discard

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.