This section contains a sample script that sets the preferences for a panel that has the following major characteristics:
The panel is an edge panel, and resides at the bottom edge of the screen.
The panel contains a file manager launcher and a Terminal launcher.
The panel contains a Window List
applet.
The sample script also sets other minor preferences. All of the preferences have default values, not mandatory values.
The sample script follows:
# Usage is: set_key <type> <key> <value> <extra options if any>
function set_key()
{
TYPE="$1"
shift
KEY="$1"
shift
VALUE="$1"
shift
OTHER_ARGS="$*"
gconftool-2 --direct --config-source xml:readwrite:/etc/gconf/gconf.xml.defaults
--owner=panel $OTHER_ARGS --type "$TYPE" --set "$KEY" "$VALUE"
}
# Define the number of panels, the number of launchers, and the number of applets
set_key list /apps/panel/default_profiles/medium/general
/panel_id_list [00000001] --list-type string
set_key list /apps/panel/default_profiles/medium/general
/object_id_list [00000001,00000002] --list-type string
set_key list /apps/panel/default_profiles/medium/general
/applet_id_list [00000001] --list-type string
# Define the characteristics of the panel
set_key string /apps/panel/default_profiles/medium/panels
/00000001/panel_type edge-panel
set_key string /apps/panel/default_profiles/medium/panels
/00000001/panel_size panel-size-x-small
set_key string /apps/panel/default_profiles/medium/panels
/00000001/screen_edge panel-edge-bottom
set_key bool /apps/panel/default_profiles/medium/panels
/00000001/hide_buttons_enabled false
set_key string /apps/panel/default_profiles/medium/panels
/00000001/panel_background_type no-background
# Define the first launcher
set_key string /apps/panel/default_profiles/medium/objects
/00000001/object_type launcher-object
set_key string /apps/panel/default_profiles/medium/objects
/00000001/launcher_location 'applications:///nautilus.desktop'
set_key string /apps/panel/default_profiles/medium/objects
/00000001/panel_id 00000001
set_key int /apps/panel/default_profiles/medium/objects
/00000001/position 20
# Define the second launcher
set_key string /apps/panel/default_profiles/medium/objects
/00000002/object_type launcher-object
set_key string /apps/panel/default_profiles/medium/objects
/00000002/launcher_location 'applications:///System/gnome-terminal.desktop'
set_key string /apps/panel/default_profiles/medium/objects
/00000002/panel_id 00000001
set_key int /apps/panel/default_profiles/medium/objects
/00000002/position 25
# Define the applet
set_key string /apps/panel/default_profiles/medium/applets
/00000001/object_type bonobo-applet
set_key string /apps/panel/default_profiles/medium/applets
/00000001/bonobo_iid OAFIID:GNOME_TasklistApplet
set_key string /apps/panel/default_profiles/medium/applets
/00000001/panel_id 00000001
set_key int /apps/panel/default_profiles/medium/applets
/00000001/position 25