2011-08-13

Configuring GNOME themes for both gconf and dconf?

For a number of years, I've been making myself metapackages that pull favorite packages and pre-configure the desktop environment to use my favorite global default settings. This currently means configuring the gconf keys for the GTK theme, icon theme and background image for GDM. Until now, I implemented this by calling gconftool-2 directly in postinst as user gdm but Lintian recently started warning me that the correct way to do this would be by calling gconf-schemas or update-gconf-defaults instead. I was thus wondering, would anyone have any sample code that accomplishes this? To further complicate things, GNOME 3 has transitioned from gconf to dconf, which suggests that a slightly different method needs to be used to perform the same. Would anyone have any sample code to implement this? Thanks in advance to anyone who can help me with this!

5 comments:

Jeremy Bicha said...

See http://manpages.ubuntu.com/manpages/oneiric/en/man1/dh_installgsettings.1.html

That should be called automatically if you're using gsettings.

Just set up an override that looks like http://bazaar.launchpad.net/~ubuntu-branches/ubuntu/oneiric/gnome-settings-daemon/oneiric/view/head:/debian/gnome-settings-daemon.gsettings-override

You might also be interested in https://live.gnome.org/dconf/SystemAdministrators

Ordinary users can use dconf-editor to change dconf settings. gsettings is what you should use if you want to work from the command line or from an app that you code.

Jeremy Bicha said...

*if you're using debhelper.

Martin-Éric said...

Thanks! This however doesn't seem to allow installing an overrride specifically for user gdm's session, which is what's needed.

Jeremy Bicha said...

I presume you're talking about Debian, not Ubuntu. Unfortunately I use Ubuntu more.

GDM3 in Debian recently got improved support for admins wanting to customize it. I believe you should look at /etc/gdm3/greeter.gconf-defaults and
/etc/gdm3/greeter.gsettings as well as
/usr/share/doc/gdm3/README.Debian

If you need more help, I suggest asking in #debian-gnome. Blogger's a bit of a pain for multiple reasons so not everyone will bother trying to comment here.

Martin-Éric said...

Actually, no. I need the same package to work on Debian (stable and testing) and on Ubuntu (Lucid, current and +1), hence why I need to cover both gconf and dconf.