Java Desktop System Release 3 Administration Guide

Setting General Preferences

The following sections describe how to assign mandatory or default values to general preferences.

To Set HTTP Proxy Preferences

To set HTTP proxy preferences, you modify the values of the preference keys in the /system/http_proxy/ location. For example, to set a mandatory value for the HTTP proxy host, execute the following command:

# gconftool-2 --direct --config-source xml:readwrite:/etc/gconf/gconf.xml.mandatory --type string --set /system/http_proxy/host proxy-name

To set a default value for the HTTP proxy host, execute the following command:

# gconftool-2 --direct --config-source xml:readwrite:/etc/gconf/gconf.xml.defaults --type string --set /system/http_proxy/host proxy-name

You can also set other HTTP proxy-related preferences. For information about the other HTTP proxy preferences, see the system_http_proxy.schemas schema definition file.

To Set the Number of Workspaces

To set a mandatory number of workspaces, execute the following command:

# gconftool-2 --direct --config-source xml:readwrite:/etc/gconf/gconf.xml.mandatory --type int --set /apps/metacity/general/num_workspaces integer

To set a default number of workspaces, execute the following command:

# gconftool-2 --direct --config-source xml:readwrite:/etc/gconf/gconf.xml.defaults --type int --set /apps/metacity/general/num_workspaces integer

You can also set other window manager preferences. For information about the other window manager preferences, see the metacity.schemas schema definition file.

To Set Keyboard Accessibility Preferences

To set keyboard accessibility preferences, you modify the values of the preference keys in the /desktop/gnome/accessibility/keyboard location. For example, if you want to set a mandatory value so that keyboard accessibility features are enabled, execute the following command:

# gconftool-2 --direct --config-source xml:readwrite:/etc/gconf/gconf.xml.mandatory --type bool --set /desktop/gnome/accessibility/keyboard/enable true

To set a default value for this preference, execute the following command:

# gconftool-2 --direct --config-source xml:readwrite:/etc/gconf/gconf.xml.defaults --type bool --set /desktop/gnome/accessibility/keyboard/enable false

You can also set other keyboard accessibility preferences. For information about the other keyboard accessibility preferences, see the desktop_gnome_accessibility_keyboard.schemas schema definition file.

To Set Keyboard Shortcut Preferences

To set keyboard shortcut preferences, you modify the values of preference keys in /apps/metacity/global_keybindings location. For example, you might want users to use only the Alt + F3 keyboard shortcut to open the Run Application dialog. To set this mandatory value, execute the following command:

# gconftool-2 --direct --config-source xml:readwrite:/etc/gconf/gconf.xml.mandatory --type string --set /apps/metacity/global_keybindings/panel_run_dialog '<Alt>F3'

You can also set other keyboard shortcut preferences. For information about the other keyboard shortcut preferences, see the metacity.schemas schema definition file.

Setting Panel and Panel Object Preferences

The panel-default-setup.entries file specifies the following details of the panels in the Java Desktop System:

The configuration of individual panels and of panel objects is a complex task. To configure individual panels and panel objects, you must first understand the structure of the panel-default-setup.entries file. For more information about the panel-default-setup.entries file, see Structure of Panel Configuration File.

To set preferences for individual panels and panel objects, you must set the values of many preferences in a configuration source. The easiest way to set the values of panel preferences is to use the gconftool-2 command with the --dump and --load options. For more information about how to set preferences for panels and objects on panels, see To Set Preferences for Individual Panels and Panel Objects.

Structure of Panel Configuration File

The file panel-default-setup.entries contains sections that specify panels and panel contents. The panel-default-setup.entries file specifies values for schema keys. The panel-default-setup.entries file resides in the /etc/gconf/schemas directory.

The panel-default-setup.entries file is structured as follows:

  1. An entrylist element that specifies the base path for all the keys in the file. The following excerpt from panel-default-setup.entries specifies /apps/panel/default_setup as the base path for keys:

    <entrylist base="/apps/panel/default_setup">

    For example, if the key general/toplevel_id_list is referred to in panel-default-setup.entries, the full path for the key is /apps/panel/default_setup/general/toplevel_id_list.

  2. Keys that specify the general structure of panels, panel applications, and other panel objects in the desktop. The following keys specify the number of panels, panel objects, and panel applications that appear in the desktop:

    • general/toplevel_id_list

    • general/object_id_list

    • general/applet_id_list

    The keys also assign identifiers to each panel, panel object, and panel application. For example, the following sample from panel-default-setup.entries specifies that one panel appears in the desktop:

    <entry>
          <key>general/toplevel_id_list</key>
          <schema_key>/schemas/apps/panel/general/toplevel_id_list</schema_key>
          <value>
            <list type="string">
              <value>
                <string>bottom_panel</string>
              </value>
            </list>
          </value>
        </entry>

    In the panel-default-setup.entries file, the identifier bottom_panel identifies the panel at the bottom of the screen.

  3. Keys that specify the properties of the panels. The panel property keys are structured as follows:

    toplevels/panel-name/panel-property-key
    

    For example, the key toplevels/bottom_panel/size specifies the size of the bottom panel.

  4. Keys that specify the panel objects, the panel object properties, and the panels in which the objects reside. For example, the following sample from panel-default-setup.entries specifies a Main Menu object at the left side of the bottom panel:

    <entry>
          <key>objects/main_menu/object_type</key>
          <schema_key>/schemas/apps/panel/objects/object_type</schema_key>
          <value>
            <string>menu-object</string>
          </value>
        </entry>
        <entry>
          <key>objects/main_menu/toplevel_id</key>
          <schema_key>/schemas/apps/panel/objects/toplevel_id</schema_key>
          <value>
            <string>bottom_panel</string>
          </value>
        </entry>
        <entry>
          <key>objects/main_menu/position</key>
          <schema_key>/schemas/apps/panel/objects/position</schema_key>
          <value>
            <int>0</int>
          </value>
        </entry>
  5. Keys that specify the panel applications, the panel application preferences, and the panels in which the panel applications reside. For example, the following sample from panel-default-setup.entries specifies the Window List panel application, in the bottom panel:

    <entry>
          <key>applets/window_list/object_type</key>
          <schema_key>/schemas/apps/panel/objects/object_type</schema_key>
          <value>
            <string>bonobo-applet</string>
          </value>
        </entry>
        <entry>
          <key>applets/window_list/toplevel_id</key>
          <schema_key>/schemas/apps/panel/objects/toplevel_id</schema_key>
          <value>
            <string>bottom_panel</string>
          </value>
        </entry>
        <entry>
          <key>applets/window_list/position</key>
          <schema_key>/schemas/apps/panel/objects/position</schema_key>
          <value>
            <int>3</int>
          </value>
        </entry>
    .
    .
    .
        <entry>
          <key>applets/window_list/bonobo_iid</key>
          <schema_key>/schemas/apps/panel/objects/bonobo_iid_type</schema_key>
          <value>
            <string>OAFIID:GNOME_WindowListApplet</string>
          </value>
        </entry>

    The OAFIID is a unique identifier for a panel application. To find the OAFIID for a particular panel application, see the .server file for the panel application in the /usr/lib/bonobo/servers directory. For example, the following excerpt from GNOME_Wncklet_Factory.server shows the OAFIID for the Window List panel application:

    <oaf_server iid="OAFIID:GNOME_WindowListApplet" 
    type="factory" location="OAFIID:GNOME_Wncklet_Factory">

To Set Preferences for Individual Panels and Panel Objects

To set the preferences for a panel and the objects on a panel, perform the following steps:

  1. Log in to a session with a test user account.

  2. Configure the panels as required.

  3. Use the --dump option with the gconftool-2 command line tool to generate a file that contains an XML description of your panel configuration. The --dump option generates a list that contains all preference keys in a GConf repository directory that you specify.

    For example, the following command creates an XML description of the default panel configuration in a file called my-panel-setup.entries:

    # gconftool-2 --dump /apps/panel/profiles/default > my-panel-setup.entries

  4. Open the my-panel-setup.entries file in a text editor, and modify the file as required.

    For example, you might want to change the location of the desktop entry files. The following is an excerpt from a file generated with the --dump option:

    <entry>
          <key>objects/object_16/launcher_location</key>
          <schema_key>/schemas/apps/panel/objects/launcher_location</schema_key>
          <value>
            <string>hadjaha-00adce02f7.desktop</string>
          </value>
        </entry>

    In the sample above, you might want to change the reference to hadjaha-00adce02f7.desktop to another desktop entry file that is available globally.

    When you generate a panel configuration with the --dump option, the positions of the panel objects are absolute positions. You might want to change the positions of panel objects from absolute positions to relative positions. The object at the extreme left of a panel has a position value of 0. The next object has a position value of 1, and so on. If you want object positions to be relative to the right side of the panel, set the value of the right_stick key to true.

  5. Use the --load option with the gconftool-2 command line tool to set the values of the default configuration source to the values in the my-panel-setup.entries file. For example, the following command sets the values of the keys in the default configuration source to the values of the corresponding keys in my-panel-setup.entries:

    # gconftool-2 --direct --config-source xml:readwrite:/etc/gconf/gconf.xml.defaults --load my-panel-setup.entries

  6. Log out of the test user account.