Packages‎ > ‎


    Manipulate the Gnome GConf database.


    gconf subcommand [-option value...]


    The gconf command manipulates the Gnome GConf database, which is used to store configuration information.

    Configuration information consist always of a key (e.g. "/extra/test/value1") and a value (e.g. "5.9"). With the help of the key a hierarchical system is implemented. Values are typed. The default type is string. Other types are "integer", "float", "boolean", "list", "pair" and "schema". "list" is a list of string values (if a list of another type is required, please mail the author!). "pair" are two string values (if a pair of other types is required, please mail the author!). A "schema" describes an entry and is normally stored below the directory "/schemas". A schema is a list of five or six elements: a type (e.g. float), a default value, a short description, a long description, an owner and a locale, which defaults to "C".

    A Catalogue of Gnome Applications and their GConf parameters.

    Gnome Administration Guide on the Use of GConf.


    gconf version

    Returns the version of the gconf library in a string of the form MajorNumber.PatchLevel.SubLevel (for example "1.0.4")

    gconf sync

    Suggests that the database should be synced.

    gconf get key [-mode mode]

    Returns the value of the entry key. An empty value is returned if the value is not set. The optional mode can be "value" (which is the default) in which case either the value of key, or, if key is not set, the default value is returned, "default" in which case the default value is returned or "noDefault" in which case either the value of key is returned or the empty string if the key is not set.

    gconf set key value [-type type]

    Sets key to the value value. The optional type can be "string" which is the default, "float", "boolean", "integer", "list", "pair" or "schema". If type is "schema" value must be a list of 5 or 6 elements: type of the entry, default value, short description, long description, owner and optional locale which defaults to "C".

    gconf unset key value [-recursive recursive]

    Unset the entry key. If key is a directory, the option recursive is given and its value is true, the unset is done recursively.

    gconf getEntry key

    Returns a list of four elements for the entry given by key: the key itself, the value (the empty string if not set), the type of the entry and a boolean value whether the entry is a directory.

    gconf getEntries key

    Returns a list of all entries in the directory given by key, each element of the list consisting of a list of the key, the value and the type of the entry.

    gconf getDirs key

    Returns a list with the keys of all subdirectories in the directory given by key.

    gconf onChanged key command

    Registers a command which is called if key or an entry below it is changed. Before evaluation the following percent strings are substituted:

    %k    key of the entry changed
    %t    type of the entry
    %V    new value of the entry

    gconf associateSchema key schema-key

    Associates a schema with an entry. Instead of executing this command it is recommended to ship a special file with an application and to use gconftool to install schema associations during "make install".


    # test-gconf-background.tcl
    # the next line restarts using tclsh \
    exec tclsh "$0" "$@"

    package require Gnocl
    package require GnoclGconf

    set tb [gnocl::toolBar -orientation vertical]
    $tb add item \
        -text TCL \
        -onClicked {
    gnocl::gconf set /desktop/gnome/background/picture_options centered -type string
    gnocl::gconf set /desktop/gnome/background/picture_filename [pwd]/Tcl.svg -type string

    $tb add item \
        -text GTK \
        -onClicked {
    gnocl::gconf set /desktop/gnome/background/picture_options wallpaper -type string
    gnocl::gconf set /desktop/gnome/background/picture_filename [pwd]/gtk.svg -type string

    gnocl::window -child $tb -widthRequest 125