Tip | |
---|---|
For more information on configuring panels, refer to the GConf chapter of the GNOME Desktop Administration Guide available through Applications (the main menu on the panel) => Help, selecting the Desktop Category, and choosing the System Administration Guide Document. |
Note | |
---|---|
For information on locking down the panel, refer to Section 4.3 Locking Down the Panel. |
The following material is meant to serve as a more technical reference for panel configuration.
The panel configuration contains a more complex set of GConf keys. This section gives an overview of how those keys are organized.
Most of the panel configuration is stored in /apps/panel/. The general/ directory contains the following keys:
The list of panel identifiers. Each identifier is also the name of the sub-directory in the toplevels directory which contains the actual preferences for that panel.
The list of panel object identifiers. Each identifier is also the name of the sub-directory in the objects directory which contains the actual preferences for that panel object.
The list of panel applet identifiers. Each identifier is also the name of the subdirectory in the applets directory, which contains the actual preferences for that panel applet.
Thus, the default contents of /apps/panel/ looks something like:
/apps/panel/general: applet_id_list = [mixer,clock,systray,...] object_id_list = [menu_bar,web_launcher,...] toplevel_id_list = [top_panel,bottom_panel] ... /apps/panel/toplevels/bottom_panel: size = 24 expand = true name = Bottom Panel orientation = bottom ... /apps/panel/objects/menu_bar: toplevel_id = top_panel object_type = menu-bar position = 0 locked = true ... /apps/panel/objects/web_launcher: toplevel_id = top_panel object_type = launcher-object position = 1 launcher_location = file:///usr/share/applications/redhat-web.desktop ... /apps/panel/applets/clock: toplevel_id = top_panel object_type = bonobo-applet position = 1 panel_right_stick = true locked = true bonobo_iid = OAFIID:GNOME_ClockApplet ... |
The default panel configuration is specified in /etc/gconf/schemas/panel-default-setup.entries. When the panel is installed, the default configuration is loaded into the Defaults Source using the gconftool-2 "--load" argument:
# gconftool-2 \ --config-source=xml:readwrite:/etc/gconf/gconf.xml.defaults \ --direct --load /etc/gconf/schemas/panel-default-setup.entries |
This command loads the default configuration into the /apps/panel/default_setup GConf directory.
Modifying the default panel configuration can be a difficult task. Unfortunately, it is also one of the more common tasks for administrators wishing to deploy a modified desktop environment configuration.
Tip | |
---|---|
Refer to the GNOME Desktop System Administration Guide for an alternative method for changing the default panel configuration to that described below. |
The following provides a more complex example of how to modify the default panel configuration.
Consider a relatively straightforward example and assume that we wish to remove the Print Manager launcher and the Notification Area from the default configuration.
Make a copy of /etc/gconf/schemas/panel-default-setup.entries:
# cp /etc/gconf/schemas/panel-default-setup.entries \ /etc/gconf/schemas/local-panel-default-setup.entries |
Edit local-panel-default-setup.entries, removing the print_launcher entry from object_id_list and removing the print_launcher directory from the objects directory:
<value> <string>spreadsheet_launcher</string> </value> <value> <string>print_launcher</string> </value> </list> </list> </value> </entry> ... <!-- Print Launcher --> <entry> <key>objects/print_launcher/object_type</key> <schema_key>/schemas/apps/panel/objects/object_type</schema_key> <value> <string>launcher-object</string> </value> </entry> ... <entry> <key>objects/print_launcher/menu_path</key> <schema_key>/schemas/apps/panel/objects/menu_path</schema_key> </entry> <entry> <key>objects/print_launcher/action_type</key> <schema_key>/schemas/apps/panel/objects/action_type</schema_key> </entry> <!-- Workspace Switcher Applet --> |
Next, remove the systray entry from applet_id_list and remove the systray directory from the applets directory:
<string>mixer</string> </value> <value> <string>systray</string> </value> <value> <string>clock</string> </value> <value> ... <!-- System Tray Applet --> <entry> <key>applets/systray/object_type</key> <schema_key>/schemas/apps/panel/objects/object_type</schema_key> <value> <string>bonobo-applet</string> </value> </entry> ... <entry> <key>applets/systray/menu_path</key> <schema_key>/schemas/apps/panel/objects/menu_path</schema_key> </entry> <entry> <key>applets/systray/launcher_location</key> <schema_key>/schemas/apps/panel/objects/launcher_location</schema_key> </entry> <entry> <key>applets/systray/action_type</key> <schema_key>/schemas/apps/panel/objects/action_type</schema_key> </entry> <!-- Clock Applet --> |
Create the configuration source into which you will load your modified default setup:
# mkdir --mode a=rwx,g=rx,o=rx \ /etc/gconf/local.xml.defaults |
It is important that your configuration source be created using the correct --mode argument to ensure it is readable by all users. GConf will use the permissions from this toplevel directory when creating new files or directories in the configuration source.
Load the new default setup into /apps/panel/default_setup in the new configuration source:
# gconftool-2 --config-source=/etc/gconf/local.xml.defaults \ --direct --load \ /etc/gconf/schemas/local-panel-default-setup.entries |
Add the new configuration source to /etc/gconf/2/path, which will cause the source to appear before the Defaults Source for all users:
# echo "xml:readonly:/etc/gconf/local.xml.defaults" \ > /etc/gconf/2/path |
Note | |
---|---|
This change will only come into effect when the GConf daemon is re-started. Therefore, it is preferable to make the change with all users logged out. |