the linux registry

What! There’s no such thing as “the Linux registry”, you say. Well, actually, yes there is. At least insofar as the typical desktop user of one of the major distirbutions will be concerned. Time to speak truth to power, and to empower those that currently lack it.

The registry I’m talking about in this post is the one that’s come with every Gnome equipped Linux distro, as well as a few Unix distros that ship with Gnome. It is called dconf.

What is dconf, and why would I need to edit it?

dconf is a low-level configuration system. Its main purpose is to provide a backend to GSettings on platforms that don’t already have configuration storage systems.

dconf is a simple key-based configuration system. Keys exist in an unstructured database (but it is intended that keys that logically belong together are grouped together).

That leading lower-case g in each sentence isn’t a typo, that’s actually how it’s written on the Gnome project page.

This dconf registry is a fact of life for anyone using Gnome. It can’t be avoided, although the Gnome developers have sought to hide most of its ugliness just as the Windows crew has tried to shield users from the Windows registry.

There are only two reasons you’d want to muck around with dconf, and they turn out to be the same reasons that apply to mucking about the Windows registry: the system is broken beyond the recovery methods provided by the developers, or there is some feature that you as a user want to enable or disable.

That second reason is what led me to discover dconf originally. The first is what keeps me going back there.

Example: every time I log into my Linux workstation I get a warning message about my XMPP server’s key not being recognized.

This is the result of the “close integration” between the Gnome Shell and Empathy, Gnome’s latest instant messaging client. Even though I’ve uninstalled Empathy and deleted all the dot files I can find that were associated with it, Gnome Shell still tries to launch it every time I log in. I have no idea, even now, where it is storing the IM account information it’s trying to connect with.

There are at least three utilities that can be used to edit dconf.

The first is dconf itself. It is a command line tool that uses a syntax like this to list all the keys under a particular schema:

dconf list /org/

Changes in values can be executed using the “write” option:

dconf write /org/gnome/desktop/empathy/autoconnect/ 'false'

The “reset” option can be used to remove a key or branch of keys:

deconf reset /org/gnome/desktop/empathy/

Then there’s gsettings. This is also a command line tool.

The syntax for gsettings is slightly different that of dconf. Where dconf uses forward slashes to separate elements of keys, gsettings uses dots. Instead of “write” you would use the option “set” to change key values.

To list all the schemas in the dconf database you would enter:

gsettings list-schemas

To get the keys under a schema:

gsettings list-keys org.gnome.desktop.empathy

The other common tool is dconf-editor. This is a graphical, gtk, tool that allows you to spelunk dconf just like you would the Windows registry.

There are a lot of blog posts on the Internet that describe how to navigate dconf. One of the better ones is Customizing the GNOME Shell from self-described “OS Plumber” Finnbarr Murphy.

The problem with any resources you’ll find on the Internet is that they tend to become dated very quickly due to the breakneck pace of change in Gnome that its developers have been proceeding at, and the willingness of distribution vendors to pass on to their too trusting users.

Oh, but back to my example. The answer for me lay in changing three settings in dconf, something I used dconf-editor to do. In gsettings syntax the first two would be:

gsettings set org.gnome.desktop.empathy autoconnect 'false'
gsettings set org.gnome.desktop.empathy use-conn 'false'

The last was a bit tricker. The setting itself was in the form of an array. To remove empathy from it you’d need to rewrite it, omitting ’empathy-desktop’ from the list:

gsettings set favorite-apps ['firefox.desktop',
 'mozilla-thunderbird.desktop', 'nautilus.desktop',
 'gnome-terminal.desktop', 'gedit.desktop', 'gcalctool.desktop',
 libreoffice-writer.desktop', 'rhythmbox.desktop',

I hope someone finds this all helpful. For me half the battle was in realizing that such a thing as a Linux (well, Gnome) registry existed. After that it was all insane rantings mixed with enough small victories to allow me enough fight for another day.

This entry was posted in System Administration on by .

About phil

My name is Phil Lembo. In my day job I’m an enterprise IT architect for a leading distribution and services company. The rest of my time I try to maintain a semi-normal family life in the suburbs of Raleigh, NC. E-mail me at philipATlembobrothersDOTcom. The opinions expressed here are entirely my own and not those of my employers, past, present or future (except where I quote others, who will need to accept responsibility for their own rants).