Author
Christopher Marshall (christopherlmarshall@yahoo.com)
Raw Notes on gconf
# main website: http://www.gnome.org/projects/gconf/ # gconf implements a registry-like set of key-value pairs, intended to track # GUI user preferences. # schemas # schemas are keys-value pairs that document the meaning of non-schema keys # More than one key can have the same schema assiociated with it. # in a sense, gconf is maintaining three mappings, key-value, key-schema, and # schema-schema_value. # the keys are arranged like a directory heirarchy. You can view every key and key-dir in the # entire heirarchy like this: gconftool-2 -R / # by convention, schemas are kept in the "directory" /schemas # but a schema could be installed anywhere in the directory heirarchy. #the gconf daemon: gconfd-2 # applications are meant to read settings through a gconf API. Attempts to do so by any application # will cause the gconf daemon to start, if it hasn't already. The gconf database is per-user oriented. # each user's running applications can see a different database, and all applications under a single # user should all see the same database. # here are its configuration directories/files: /etc/gconf/2/path /etc/gconf/gconf.xml.defaults/ /etc/gconf/gconf.xml.mandatory/ /etc/gconf/schemas/ # the path file lists sources of key-value pairs, in the order they should # be searched when asked to retrieve a value from a key. Once a value is found, # the serach stops. Notice how gconf.xml.mandatory overrides everything else, # and how everything else overrides gconf.xml.defaults # the path file has these contents: xml:readonly:/etc/gconf/gconf.xml.mandatory include /etc/gconf/2/local-mandatory.path include "$(HOME)/.gconf.path" xml:readwrite:$(HOME)/.gconf include /etc/gconf/2/local-defaults.path xml:readonly:/etc/gconf/gconf.xml.defaults # the main tool/program: gconftool-2 gconfd-2 # examples: # recursively list all keys and key directories gconftool-2 -R / # just list everything under /desktop/gnome gconftool-2 -R /desktop/gnome # get a key value gconftool-2 --get <key name> # find the schema associated with <key> gconftool-2 --get-schema-name <key> # then get the schema gconftool-2 --get <schema-name> # binary package building # disable schema installation prior to the make install step like this: export GCONF_DISABLE_MAKEFILE_SCHEMA_INSTALL=1 make install unset GCONF_DISABLE_MAKEFILE_SCHEMA_INSTALL # the make install will save a file of schema definitions in /etc/gconf/schemas # but not install them when we disable it like this. # in the package installation script, install the package schemas like this: export GCONF_CONFIG_SOURCE=$(gconftool-2 --get-default-source) gconftool-2 --makefile-install-rule /etc/gconf/schemas/$PKG.schemas GCONFDPID=$(pidof gconfd-2) kill -HUP $GCONFDPID # we figure out where the default source directory is, install the schemas there, # then kill the gconf so it has to restart as re-read the database.
