Another irritation with Gnome's gconf settings system

June 4, 2009

As if the first irritation wasn't enough, there's another problem with the Gnome settings stuff. It is this: modern Gnome applications keep all of their settings locked up inside gconf, even things that you enter and that in another, simpler era would have been stuck in dotfiles somewhere.

This has a practical issue that I have been running into after learning about convenient ssh in Gnome; it's hard to move settings for something from machine to machine. Consider the mini-commander applet macros, which are stored as gconf settings. I'd like to be able to just copy improvements I make from system to system (instead of having to re-enter them), and to easily install the setup on new machines. With dotfiles, this would be obvious; with gconf, what I have is in practice an opaque blob.

(To its credit, sshmenu does have an actual dotfile for its host information that I can just copy around.)

In theory, one can use tools like gconftool-2 to extract and then set this information, provided that you know the gconf keys (and you can use gconftool-2 to trawl for the keys, too). In practice, this leaves you to reverse engineering the application's key usage and thus to hope that you have not missed anything important, that you have included everything you need to, and that you haven't included something you don't want to.

Part of the problem is that, of course, applications are not organizing their keys for your convenience; in this sort of case, they're using gconf as a datastore. The mini-commander applet makes a good example; as far as I can tell, it stores its macros in two keys (both in /apps/mini-commander); macro_patterns seems to be a list of the regexp patterns, in order, and macro_commands seems to be a list of the matching commands, in the same order. I assume that it being stored this way means that gconf only has single level lists, so you can't have lists of lists.

(Disclaimer: it's possible that the mini-commander applet is a bad example and that good Gnome programs don't act this way. I'm not really optimistic, though.)

Comments on this page:

From at 2009-06-04 03:03:52:

you can also run

gconftool --dump /apps/epiphany > epiphany.xml

to dump all epiphany settings and on the other host run

gconftool --load epiphany.xml

to restore them again. of course you can also manipulate the xml file before restoring...

hth, youam

From at 2014-01-22 20:11:16:

In GNOME 3 the equivalents are `dconf dump /` and `dconf load /` which output keyfile-format dumps. It's possible to configure dconf-daemon to use the same format on disk, but is inefficient compared to the GVariant database.

Written on 04 June 2009.
« The costs of development versus the costs of operation
How we're planning our backup storage capacity needs »

Page tools: View Source, View Normal, Add Comment.
Login: Password:
Atom Syndication: Recent Comments.

Last modified: Thu Jun 4 02:22:31 2009
This dinky wiki is brought to you by the Insane Hackers Guild, Python sub-branch.