Go to main content

Oracle® Solaris 11.3 Desktop Administrator's Guide

Exit Print View

Updated: March 2018
 
 

GConf Repository Components

The GConf repository is structured like a simple file system, which contains keys organized into a hierarchy. Each key is either a directory containing more keys or has a value.

    The repository is organized into logical groups based on the application type and contains the following directories:

  • Directories that correspond to applications that use the GConf repository. You can see the following directories:

    • system

    • desktop

    • apps

    For example, the file system contains the directory /apps/metacity.

  • Subdirectories that correspond to categories of preferences.

    For example, the file system contains the directory /apps/metacity/general.

  • A directory called schemas that contains schema files. The schema files describe all preference keys.

Each preference in the GConf repository is expressed as a key-value pair. A GConf preference key is an element in the repository that corresponds to an application preference. For example, the /apps/gnome-session/options/show_splash_screen preference key corresponds to the Show Splash Screen on Login option in the Sessions preference tool.

    Preference keys typically have simple data types, such as the following:

  • Strings

  • Integers

  • Lists of strings

  • Lists of integers

The format of the preference key in the repository depends on the Extensible Markup Language (XML) backend module that is used to read the repository. The following is an example of the /desktop/gnome/interface/font_name preference key when an XML backend module is used to read the repository:

<entry name="font_name" mtime="1038323555" muser="user123" type="string">
		<stringvalue>Sans 10</stringvalue>
</entry>

Note - When this guide refers to a preference key, the path to the key is added to the name of the key. For example, the font_name preference key in the /desktop/gnome/interface subdirectory is referred to as /desktop/gnome/interface/font_name.

Configuration Sources

The GConf repository contains a series of storage locations that are called configuration sources. The configuration sources are listed in the GConf path file, which is located in the /etc/gconf/2 directory.

    The path file specifies the following information for each configuration source:

  • Backend module to use to read the repository

  • Permissions on the repository

  • Location of the repository

The GConf path file also contains include instructions. By default, the contents of the GConf path file are as follows:.

xml:readonly:/etc/gconf/gconf.xml.mandatory
include /etc/gconf/2/local-mandatory.path
include "$(HOME)/.gconf.path"
include /etc/gconf/2/local-defaults.path
xml:readwrite:$(HOME)/.gconf
xml:readonly:/etc/gconf/gconf.xml.defaults

When GConf searches for a preference value, GConf reads the configuration sources in the order specified in the path file. The following table describes the configuration sources in the path file.

Configuration Source
Description
Mandatory
The permissions to the configuration source are set to read only. Users cannot overwrite the values in this source. So, the preferences in the source are mandatory.
User
The configuration source is stored in the .gconf directory in the home directory of the user. When the user sets a preference, the new preference information is added to this location.
You can use the Configuration Editor application to modify the user configuration source.
Default
The configuration source contains the default preference settings.

    GConf applies preferences in the following order of priority:

  1. Mandatory preferences.

  2. User-specified preferences.

  3. Default preferences

The include instructions in the GConf path file enable you to specify other configuration sources.

Included Configuration Source
Description
/etc/gconf/2/local-mandatory.path
Use this configuration source to store mandatory preference values for a particular system.
$(HOME)/.gconf.path
Specify the location of the configuration source in the home directory in the .gconf.path file.
/etc/gconf/2/local-defaults.path
Use this configuration source to store default preference values for a particular system.

GConf Schema

A GConf schema is a collective term for a GConf schema key and a GConf schema object. Schema keys, schema objects, and their relationship to preference keys are defined as follows:

  • Preference key – An element in the GConf repository that corresponds to an application preference , for example, /desktop/gnome/interface/font_name.

  • Schema key – A key that stores a schema object for a preference key , for example, /schemas/desktop/gnome/interface/font_name.

  • Schema object – An element in a configuration source that contains the following information for a preference key:

    • Name of the application that uses the preference key

    • Type of value required for the preference key, for example, integer, boolean, and so on.

    • Default value for the preference key

    • Brief documentation about the preference key

    For example, the schema object for the /schemas/desktop/gnome/interface/font_name key is as follows:

    <schema>
      <applyto>/desktop/gnome/interface/font_name</applyto>
      <key>/schemas/desktop/gnome/interface/font_name</key>
      <owner>gnome</owner>
      <type>string</type>
      <default>Sans 10</default>
      <locale name="C">
        <short>Default font</short>
        <long>Name of the default font used by gtk+.</long>
      </locale>
    </schema>

You can associate a schema key with a preference key. For example, the /desktop/gnome/interface/font_name key includes the following schema key:

<entry name="font_name" mtime="1034873859" 
schema="/schemas/desktop/gnome/interface/font_name"/>

When you associate a schema key with a preference key, the preference uses the suggested value that is specified in the schema object of the schema key. The suggested value is contained in the <default> element in the schema object. By default, all the preference keys in the default configuration source are associated with schema keys. Typically, schemas are stored in the default configuration source.

Schema Definition Files

Schemas are generated from schema definition files. A schema definition file defines the characteristics of all keys for a particular application and is used to create a new configuration source. The schema definition files have a .schemas extension and are included in the /etc/gconf/schemas directory.

Some schema definition files correspond closely to a part of the Oracle Solaris Desktop user interface. For example, the system_http_proxy.schemas file describes keys that correspond to the preferences in the Internet preference tool.

Other schema definition files describe keys that are not exposed by the Oracle Solaris Desktop user interface. For example, the panel-global.schemas file describes the /apps/panel/global/tooltips_enabled key. This key, which controls whether tooltips are shown on desktop panels, is not exposed as a preference in any desktop preference tool. Such keys might be modified using the gconftool-2 command. For more information, see Working With the GConf Command-Line Tool.

Some parts of the Oracle Solaris Desktop user interface contain preferences that represent GConf keys from more than one schema definition file. For example, the Keyboard Shortcuts preference tool contains preferences that represent keys from the panel-global-config.schemas and metacity.schemas files.