GNOME Bugzilla – Bug 531169
A mechanism for setting defaults
Last modified: 2009-01-17 21:02:07 UTC
We are looking at a way to use the existing gnome capplets to set system-wide defaults. One use-case for this is to set the gconf keys that influence the login screen with gdm 2.22, e.g the /desktop/gnome/background/picture_filename for the background image. What I am proposing here is a dbus service that takes a list of GConf keys and copies the values from the callers GConf database to the system-wide database. This is a privileged operation and access to it is controlled via PolicyKit. The service is not running all the time, it gets activated via system bus activation. Additionally, the service can also set and unset mandatory values.
Created attachment 110305 [details] [review] patch
Created attachment 112097 [details] [review] updated patch Here is a new patch that completes the previous one by making notice if defaults change underneath it. This is implemented by having the defaults-mechanism emit a signal on the session bus, that is then caught by the gconfds.
You want to use s/description/_description/ s/message/_message/ in defaults/org.gnome.gconf.defaults.policy.in file.. and also add this file to po/POTFILES.in to make sure i18n works.
2008-07-11 Matthias Clasen <mclasen@redhat.com> Bug 531169 – A mechanism for setting defaults The cache-clearing part of this patch is thanks to Behdad Esfahbod. * defaults/*: A DBus system bus service that can copy a subtree of GConf values from the callers db to a system-wide db, using PolicyKit to control access. * configure.in: Add --enable-defaults-service to optionally build the defaults service. * gconf/gconf-database.[hc]: Add gconf_database_clear_cache_for_sources. * gconf/gconf-sources.[hc]: Add gconf_sources_clear_cache_for_sources. * gconf/gconfd.c: Listen for changes in the system-wide databases by the defaults service, and clear the cache. * po/POTFILES.in: Glue * Makefile.am: Glue
Created attachment 114405 [details] [review] the patch that was committed