By Jack WallenThis article is also available as a TechRepublic download.
If you want to create an image CD to use to setup large numbers of client machines, having to go through every single application to set up preferences could easily be a full-time job in itself. What if you have hundreds of desktop machines, and each of them need changes made to desktop settings? What do you do?
The GNOME configuration tool, Gconf, aggregates thousands of user settings in one location. For every application installed, for every possible desktop setting, Gconf works as the front end, creating an XML-based preferences "database." We're not talking about MySQL or Apache settings; we're talking about user-space applications. We're talking about word processing, e-mail, and browsing, those day-to-day workhorse applications that comprise the bulk of users' work.
Gconf is a great application, but it's not without its share of problems. Many developers look at Gconf as a pariah because newbie-level users can open the tool up and completely mess up their desktop settings, requiring you to come to the rescue. Many of the GNOME community feel the Gconf front-end just gives the user far too many confusing options to configure. So much controversy has come about with this tool that patches for many popular applications have arisen to add back to the applications once hidden options so to avoid the need for Gconf.
Ultimately, however, Gconf is a valuable tool. This article will introduce you to this tool and show you how to take advantage of its power.
What is Gconf?
Gconf is not your standard configuration tool. You won't find a bunch of point-and-click buttons like in individual application preferences. It would be best to think of Gconf as similar to the Windows Registry editor. Gconf is a front-end tool that writes to an XML preferences file. The files Gconf writes to are located in /.gconf. If you open up a terminal window and change to the /.gconf directory, you should see four subdirectories:
<?xml version="1.0"?><gconf> <entry name="last_version" mtime="1178123516" type="string"> <stringvalue>2.8.0</stringvalue> </entry> <entry name="version" mtime="1175861456" type="string"> <stringvalue>2.8.0</stringvalue> </entry></gconf>
The contents should be fairly obvious. This is the file that tells Gconf what version of Evolution is installed. Dig even further into this directory, and you'll see the following:
<?xml version="1.0"?><gconf> <entry name="sources" mtime="1175861455" type="list" ltype="string"> <li type="string"> <stringvalue><?xml version="1.0"?><groupuid="1175861455.20999.17@linux-wsbm" name="On This Computer" base_uri="file:///root/.evolution/addressbook/local" readonly="no"><sourceuid="1175861455.20999.18@linux-wsbm" name="Personal" relative_uri="system"><properties><property name="completion" value="true"/></properties></source></group></stringvalue> </li> <li type="string"> <stringvalue><?xml version="1.0"?><groupuid="1175861455.20999.19@linux-wsbm" name="On LDAP Servers" base_uri="ldap://" readonly="no"/></stringvalue> </li> </entry></gconf>
As the application gets larger, so does the XML file. Imagine having to hand-edit these files one at a time. Of course, that wouldn't happen, because you could simply fire up Evolution and make all of the configuration changes necessary. Although, then you'd have to fire up every application used to do so. Instead, Gconf comes to the rescue.
Starting up and poking around
Gconf is included in any of the GNOME 2.x releases. You can get the latest source from the GNOME FTP server. The GNOME team must have listened to the concerns of the developers, because the only way to fire up Gconf is from the command line. Working from OpenSuSE 10.2, there is no menu entry or clickable button from within one of the many YaST2 tools that will start Gconf. So you have to fire up a terminal and enter gconf-editor to start up Gconf. Figure A shows the opening screen for Gconf.