A Gnome irritation

April 23, 2009

Here is one of my periodic irritations, posed as a question:

How do you revert a modern Gnome application's settings back to completely stock values?

In the traditional Unix world, programs wrote their settings to dotfiles (sometimes dot-directories). If you wanted to reset a program back to its starting state, you removed the program's dotfile or dotdir, and you were done. In the modern Gnome world, not so much, because dotfiles are old fashioned now.

(Oh, some programs still have dotfiles or dotdirs, and you'd better remove them too. This is part of the irritation.)

These days Gnome applications store most or all of their settings in gconf, which is one of those great big magic databases like the Windows Registry. And just like what happens with the Windows Registry, your gconf database will accrete all sorts of cruft over time as applications dump settings in there and they never get cleaned up. Maybe the application got removed; maybe you stopped using it; maybe the application changed the keys it uses and didn't clean up the old ones for various reasons.

So the answer to my question is 'you have to remove the application's keys from your gconf database somehow'. I am sure that there is a magic incantation of some utility that will do it, but I don't know what it is and it is not exactly documented. Apparently reverting settings is something that's supposed to be left up to applications, or just not considered important.

(One might innocently think that removing files from ~/.gconf would do it. Not so fast; you probably have a running gconfd process which is holding everything in memory too, and if you try this it will helpfully rewrite those files you removed when you, say, log out.)


Comments on this page:

From 195.26.247.140 at 2009-04-23 05:13:27:

Do we not learn from the terrible mistakes of the windows registry? :(

From 65.172.155.230 at 2009-04-23 10:33:00:

My understanding is that you run "gconftool-2 --recursive-unset /gconf/key/path/to/user/settings" ... at which point the defaults come from the installed "schema". How a normal person finds out the gconf key path, I'm not sure. It would have certainly been nice if they'd had all applications come with a --reset-to-default option which calls some gconf API.

Saying that applications also have some of their settings be system wide, like the blinking cursor snafu in gnome-terminal.

By cks at 2009-04-24 16:07:37:

I don't mind the system-wide settings; I sort of consider whether an application puts their 'default' settings in their binary or in some configuration file somewhere to be an implementation detail. (This gets less clear when people make bizarre distribution specific changes to said configuration files.)

Written on 23 April 2009.
« Why your ticketing system should not be accessible to users
The difference between Web 1.0 and Web 2.0 »

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

Last modified: Thu Apr 23 00:52:22 2009
This dinky wiki is brought to you by the Insane Hackers Guild, Python sub-branch.