I’ve been customizing the Gnome Gconf defaults for my local site for
quite some time now. The Gnome manuals are quite clear about how to use
gconf.xml.defaults to alter the default
Gnome settings. For example, I like the weather applet included in RHEL
6’s default desktop but I’d much rather it show the weather for Raleigh,
NC rather than Boston, MA. My user base also really appreciates having a
terminal launcher on the Gnome panel in their default desktop.
Until our RHEL 6.0 upgrade to 6.1 completely reverted a lot of my
customizations. Sure enough, the gnome-panel package now somehow
believes that it can use a %post script to nuke the panel settings in
gconf.xml.defaults and replace them with its pristine versions. Its a
lot cooler in Boston than it is here in Raleigh.
I filed a bug in Red Hat’s Bugzilla to be told that I should put my site
local customizations in the
gconf.xml.system tree. That was the first
I’d heard of this new Gconf configuration source. Its not in the Gnome
manuals which indicate that you should add site local stuff to the
gconf.xml.defaults tree. This appears to be a Fedora or Red Hat -ism.
If Red Hat can make new random Gconf configuration sources then so can I. Also, they wont be wiped out by some package upgrade. Here’s how its done.
First I added the following files to my configuration management tool, Bcfg2
I didn’t modify the contents of the
path file but I stored the
versions I had for RHEL 5 and RHEL 6. That file references the
/etc/gconf/2/local-defaults.path file which is what I was interested
/etc/gconf/2/local-defaults.path I added a new and unique location
of my site local configuration source. (Making sure to do so after any
reference to includes from the user’s home directory as is present in
RHEL 5.) Gconf parses these files from top to bottom. I want to
customize the local defaults not prevent the users from changing them.
Next I made sure that directory was created by enforcing its existence with Bcfg2. (If that directory doesn’t exist the following step will create it, but the access permissions will be incorrect rendering it unreadable by users.)
Now I run an Action with Bcfg2 that loads my local customizations into the new Gconf source. Here’s the scriptlet I’m using. (Which references all the XML files I manage that contain Gconf bits.)
for f in `ls /usr/share/realmconfig/data/*.xml` ; do /usr/bin/gconftool-2 --direct \ --config-source xml:readwrite:/etc/gconf/gconf.xml.ncsu \ --load $f done
Now I have my own Gconf configuration source that I can completely manage with Bcfg2.