Contents
This chapter discusses the following topics:
GConf is a system for storing application preferences that simplifies the administration of user preferences. GConf lets system administrators do the following:
Set mandatory values for particular preferences for all users. This controls whether users can update particular preferences.
Set default values for particular preferences for all users.
Use suggested values for preferences that are specified in definition files for the preferences.
Read documentation on each preference.
GConf also notifies applications when a preference value changes, locally or across a network. Therefore, when you change a preference, all applications that use the preference are immediately updated.
GConf provides a preferences database, similar to a simple file system. The file system
contains keys organized into a hierarchy. Each key is either a directory containing more keys or
it has a value. For example, the key /apps/metacity/general/titlebar_font
contains an integer value giving the size of the titlebar font for the Metacity window manager.
GConf has the following components:
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. The GNOME
Desktop user interface does not contain all of the preference keys in the GConf repository. For
example, the Panel preference tool does not contain an option that corresponds to the
/apps/panel/global/tooltips_enabled key.
The repository is structured like a simple hierarchical file system. The repository contains the following:
Directories that correspond to applications that use the GConf repository. 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.
Special files that list the preference keys in the directory and contain information
about the keys. For example, a file that contains information about the keys that relate to
the HTTP proxy preferences is in the directory /system/http_proxy.
A /schemas directory that contains files that describe all of the
preference keys.
Preference keys typically have simple values such as strings, integers, or lists of strings and integers. The format of the preference key in the repository depends on the 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 Extensible Markup Language (XML) backend module is used to read the repository:
<entry name=”font_name” mtime=”1038323555” muser=”user123” type=”string”> <stringvalue>Sans 10</stringvalue> </entry>
![]() | |
When this guide refers to a preference key, the path to the key is added to the name of
the key. For example, the | |
The GConf repository contains a series of storage locations that are called configuration
sources. The configuration sources are listed in the /etc/opt/gnome/opt/gnome/gconf/
gconf-version-number/ path GConf path file. Each user has a path file. 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/opt/gnome/opt/gnome/gconf/gconf.xml.mandatory include /etc/opt/gnome/opt/gnome/gconf/2/local-mandatory.path include “$(HOME)/.gconf.path” include /etc/opt/gnome/opt/gnome/gconf/2/local-defaults.path xml:readwrite:$(HOME)/.gconf xml:readonly:/etc/opt/gnome/opt/gnome/gconf/gconf.xml.defaults
When GConf searches for a preference value, it reads the configuration sources in the order specified in the path file. The following table describes the configuration sources in the path file:
Table 10.1. Configuration Sources in the Path File¶
The sequence of the configuration sources in the path file ensures that mandatory preference settings override user preference settings. The sequence also ensures that user preference settings override default preference settings. That is, GConf applies preferences in the following order of priority:
Mandatory preferences
User-specified preferences
Default preferences
The include instructions in the GConf path file enable system administrators to specify other configuration sources:
Table 10.2. Other Configuration Sources¶
A GConf schema is a collective term for a GConf schema key and a GConf schema object. The following table describes schema keys and schema objects and their relationship to preference keys:
Table 10.3. Schema Keys and Objects¶
The following are examples of a preference key, a schema key, and a schema object:
Table 10.4. Preference Key, Schema Key, and Schema Object Examples¶
You can associate a schema key with a preference key. For example, the following
/desktop/gnome/interface/font_name key includes a 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.
Schemas are generated from schema definition files. A schema definition file defines the
characteristics of all of the keys in a particular application. Schema definition files have a
.schemas extension.
The schema definition files are included in the
/etc/opt/gnome/opt/gnome/gconf/schemas directory. You can use the schema
definition files to create a new configuration source.
Some schema definition files correspond closely to a part of the GNOME Desktop user
interface. For example, system_http_proxy.schemas corresponds to the Network Proxy preference
tool. Other schema definition files contain preference keys that are not present in the GNOME
Desktop user interface. For example, the
/apps/panel/global/tooltips_enabled key is not present.
Some parts of the GNOME Desktop user interface contain preferences that represent preference 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.
The GConf daemon is called gconfd-2. It notifies applications when a preference value changes. For example, you might choose to show only icons in toolbars in the Menus & Toolbars preference tool. When you select this option in the preference tool, the toolbars on all open applications are updated instantly. The daemon can operate locally or across a network.
An instance of the GConf daemon is started for each user. It does not have to deal with complex problems such as authentication and data security. When the daemon starts, it loads the GConf path file. The daemon also manages all access between applications and the configuration sources.
When an application requests the value of a preference key, the daemon searches the configuration sources as follows:
Search for the value of the preference key in each configuration source, in the order specified in the path file.
If the value is found, return the value.
If the value is not found, search for the schema key that corresponds to the preference key in each configuration source, in the order specified in the path file.
If the schema key is found, check the value of the schema key.
If the value of the schema key is a schema object, return the suggested value in the <default> element of the schema object.
The GConf daemon also caches preference key values. All applications use this cache, so applications need to access the configuration sources only once.
To terminate the GConf daemon, use the following command:
gconftool-2 --shutdown
GConf includes a command line tool called gconftool-2. You can use gconftool-2 to perform the following tasks:
Set the values of keys
Display the values of keys
Install schemas from schema definition files when you install an application
For example, you would use the following command to display the values of all keys in the
/desktop/gnome directory and subdirectories:
gconftool-2 --recursive-list /desktop/gnome
The following table lists some of the options that you can use with the gconftool-2 command:
Table 10.5. gconftool-2 Options¶
|
Option |
Function |
|---|---|
|
|
Lists all subdirectories in a directory that you specify. |
|
|
Displays the values of all keys in a directory that you specify. |
|
|
Use with the
|
|
|
Use with the
|
|
|
Generates a list that contains all preference keys in a GConf repository directory that you specify. The list contains XML descriptions of all the keys, in a <gconfentryfile> element. For example, you can redirect the output from this option to generate a file that
lists all keys that are related to your panel configuration. You can use the
|
|
|
Displays the value of a preference key that you specify. Also displays the values of the elements in the schema object for a schema key that you specify. |
|
|
Displays a help message about the gconftool-2 command and the options that you can use with it. |
|
|
Sets the values of preference keys in the current directory in a configuration source
to the values in the file that you specify. The file that you specify must contain XML
descriptions of the keys, in a |
|
|
Use with the
|
|
|
Installs schema definition files to applications. |
|
|
Use with the
|
|
|
Displays the values of all preference keys in all subdirectories in a directory that you specify. |
|
|
Resets the values of all preference keys, in all subdirectories in a directory, from the user setting to the setting in the default configuration source. |
|
|
Sets the value of a preference key and writes the value to the user configuration
source. Use it with the
gconftool-2 --set “/apps/gnome-terminal/profiles/Default/background_color” --type string “#000000”
You can also use it with the
|
|
|
Sets the value of an attribute in a schema key and writes the value to the default configuration source. Use it with the following options to specify the attribute that you want to update:
For example, the following command sets the short description in the schema key for
the
gconftool-2 --set-schema “/schemas/apps/gnome-terminal/profiles/Default/background_color” --short-desc “Default background color of terminal”
|
|
|
Use with the
|
|
|
Terminates the GConf daemon. |
|
|
Specifies the data type when you set a value of a preference key. You can also use this option when you set the value of an attribute in a schema key. The following are valid data types:
|
|
|
Resets the value of a preference key from the user setting to the setting in the default configuration source. |
|
|
Displays a brief help message about the gconftool-2 command and the options that you can use with it. |
You can set a mandatory value or a default value for a preference key. Before you change mandatory preference values or default preference values for users, you must ensure that the GConf daemon is not running for any user.
![]() | |
Before you change mandatory preference values or default preference values for users, you must ensure that all users are logged out. | |
To set a mandatory value or a default value for a preference key, use the gconftool-2 command, as follows:
gconftool-2 --direct --config-source configuration-source --type data-type --set preference-keyvalue
For example, to set wwwproxy.xyz.com as the mandatory HTTP proxy host,
use the following command:
gconftool-2 --direct --config-source xml:readwrite:/etc/opt/gnome/opt/gnome/gconf/gconf.xml.mandatory --type string --set /system/http_proxy/host wwwproxy.xyz.com
The user cannot override this preference value.
You can also use the gconftool-2 command to set default values. For example, to set the default number of workspaces to five, use the following command:
gconftool-2 --direct --config-source xml:readwrite:/etc/opt/gnome/opt/gnome/gconf/gconf.xml.defaults --type int --set /apps/metacity/general/num_workspaces 5
The user can override this preference value.
The following sections describe how to assign mandatory or default values to general preferences:
To set HTTP proxy preferences, 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, use the following command:
gconftool-2 --direct --config-source xml:readwrite:/etc/opt/gnome/opt/gnome/gconf/gconf.xml.mandatory --type string --set /system/http_proxy/host proxy-name
To set a default value for the HTTP proxy host, use the following command:
gconftool-2 --direct --config-source xml:readwrite:/etc/opt/gnome/opt/gnome/gconf/gconf.xml.defaults --type string --set /system/http_proxy/host proxy-name
You can also set other HTTP proxy-related preferences. For more information, see the
system_http_proxy.schemas schema definition file.
To set print manager preferences, modify the values of the preference keys in the
/apps/gnome-print-manager location. For example, if you do not want users
to view the print jobs of other users, set a mandatory value as follows:
gconftool-2 --direct --config-source xml:readwrite:/etc/opt/gnome/gconf/gconf.xml.mandatory --type bool --set /apps/gnome-print-manager/show_all_jobs false
To set a default value for this preference, use the following command:
gconftool-2 --direct --config-source xml:readwrite:/etc/opt/gnome/gconf/gconf.xml.defaults --type bool --set /apps/gnome-print-manager/show_all_jobs false
You can also set other print manager preferences. For more information, see the
gnome-print-manager.schemas schema definition file.
To set a mandatory number of workspaces, use the following command:
gconftool-2 --direct --config-source xml:readwrite:/etc/opt/gnome/gconf/gconf.xml.mandatory --type int --set /apps/metacity/general/num_workspaces integer
To set a default number of workspaces, use the following command:
gconftool-2 --direct --config-source xml:readwrite:/etc/opt/gnome/gconf/gconf.xml.defaults --type int --set /apps/metacity/general/num_workspaces integer
You can also set other window manager preferences. For more information, see the metacity.schemas schema definition file.
To set keyboard accessibility preferences, 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, use the following
command:
gconftool-2 --direct --config-source xml:readwrite:/etc/opt/gnome/gconf/gconf.xml.mandatory --type bool --set /desktop/gnome/ accessibility/keyboard/enable true
To set a default value for this preference, use the following command:
gconftool-2 --direct --config-source xml:readwrite:/etc/opt/gnome/gconf/gconf.xml.defaults --type bool --set /desktop/gnome/ accessibility/keyboard/enable false
You can also set other keyboard accessibility preferences. For more information, see the
desktop_gnome_accessibility_keyboard.schemas schema definition file.
To set keyboard shortcut preferences, 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, use the following command:
gconftool-2 --direct --config-source xml:readwrite:/etc/opt/gnome/gconf/gconf.xml.mandatory --type string --set /apps/metacity/global_keybindings ’<Alt>F3’
You can also set other keyboard shortcut preferences. For more information, see the
metacity.schemas schema definition file.
The panel-default-setup.entries file specifies the following details of the panels in the GNOME Desktop:
Number of panels
Types of the panels
Properties of the panels
Contents of the panels
The configuration of individual panels and of panel objects is a complex task. You must first understand the structure of the panel-default-setup.entries file. For more information, see Section 10.1.5.6.1, “Specifying Individual Panels and Panel Objects”.
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 do this is to use the
gconftool-2 command with the --dump and --load options. For
more information, see Section 10.1.5.6.2, “Setting Preferences for Individual Panels and Panel Objects”.
The panel-default-setup.entries file contains sections that specify
panels and panel contents, and it specifies values for schema keys. This file is located in
the /etc/opt/gnome/gconf/schemas directory.
The panel-default-setup.entries file is structured as follows:
Keys that specify the general structure of panels, applets, and other panel objects in the GNOME Desktop.
The following keys specify the number of panels, panel objects, and applets that appear in the GNOME Desktop:
/apps/panel/default_setup/general/toplevel_id_list
/apps/panel/default_setup/general/object_id_list
/apps/panel/default_setup/general/applet_id_list
The keys also assign identifiers to each panel, panel object, and applet. For example, the following sample from panel-default-setup.entries specifies that one panel appears in the GNOME Desktop:
<entry>
<key>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 bottom edge panel.
Keys that specify the properties of the panels.
The panel property keys are structured as follows:
/apps/panel/default_setup/toplevels/panel-name/panel-property-key
For example, the /apps/panel/default_setup/toplevels/bottom_panel/size
key specifies the size of the bottom panel.
Keys that specify the panel objects, the panel object properties, and the panels where 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:
<entrylist base=”/apps/panel/default_setup/objects/main_menu”>
<entry>
<key>object_type</key>
<schema_key>/schemas/apps/panel/objects/object_type</schema_key>
<value>
<string>menu-object</string>
</value>
</entry>
<entry>
<key>toplevel_id</key>
<schema_key>/schemas/apps/panel/objects/toplevel_id</schema_key>
<value>
<string>bottom_panel</string>
</value>
</entry>
<entry>
<key>position</key>
<schema_key>/schemas/apps/panel/objects/position</schema_key>
<value>
<int>0</int>
</value>
</entry>
.
.
.
</entrylist>
Keys that specify the applets, the applet preferences, and the panels where the applets reside.
For example, the following sample from panel-default-setup.entries
specifies the Window List applet, in the bottom panel:
<entrylist base=”/apps/panel/default_setup/applets/window_list”>
<entry>
<key>object_type</key>
<schema_key>/schemas/apps/panel/objects/object_type
</schema_key>
<value>
<string>bonobo-applet</string>
</value>
</entry>
<entry>
<key>toplevel_id</key>
<schema_key>/schemas/apps/panel/objects/toplevel_id
</schema_key>
<value>
<string>bottom_panel</string>
</value>
</entry>
<entry>
<key>position</key>
<schema_key>/schemas/apps/panel/objects/position
</schema_key>
<value>
<int>2</int>
</value>
</entry>
.
.
.
<entry>
<key>bonobo_iid</key>
<schema_key>/schemas/apps/panel/objects/bonobo_iid_type</schema_key>
<value>
<string>OAFIID:GNOME_WindowListApplet</string>
</value>
</entry>
</entrylist>
The OAFIID is a unique identifier for an applet. To find the OAFIID for a particular
applet, see the .server file for the applet in the
/usr/lib/bonobo/servers directory. For example, the following excerpt
from GNOME_Wncklet_Factory.server shows the OAFIID for the Window List
applet:
<oaf_server iid=”OAFIID:GNOME_WindowListApplet” type=”factory” location=”OAFIID:GNOME_Wncklet_Factory”>
Log in to a GNOME session, then configure the panels as required.
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
Open the my-panel-setup.entries file in a text editor, then 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 above example, 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 these
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.
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/opt/gnome/gconf/gconf.xml.defaults --load my-panel-setup.entries
The following sections describe how to assign mandatory or default values to look-and-feel preferences:
To set font preferences, modify the values of two preference keys. The following table shows the keys to modify and the part of the user interface that the keys correspond to:
Table 10.6. Font Preference Keys¶
For example, to set Sans 12 as the mandatory application font, use the following command:
gconftool-2 --direct --config-source xml:readwrite:/etc/opt/gnome/gconf/gconf.xml.mandatory --type string --set /desktop/gnome/interface/font_name “Sans 12"
To set Palatino 12 as the default desktop object font, use the following command:
gconftool-2 --direct --config-source xml:readwrite:/etc/opt/gnome/gconf/gconf.xml.defaults --type string --set /apps/nautilus/preferences/desktop_font “palatino 12"
To set preferences for the desktop background, modify the values of the preference keys in
the /desktop/gnome/background location. For example, to set a mandatory
image for the background, use the following command:
gconftool-2 --direct --config-source xml:readwrite:/etc/opt/gnome/gconf/gconf.xml.mandatory --type string --set /desktop/gnome/background/picture_filename filename.png
To set a default value for this preference, use the following command:
gconftool-2 --direct --config-source xml:readwrite:/etc/opt/gnome/gconf/gconf.xml.defaults --type string --set /desktop/gnome/background/picture_filename filename.png
You can also set other background preferences. For more information, see the
desktop_gnome_background.schemas schema definition file.
To set splash image preferences, modify the value of the preference keys in the
/apps/gnome-session/options/ location. For example, if you do not want users ever
to see a splash image, set a mandatory value as follows:
gconftool-2 --direct --config-source xml:readwrite:/etc/opt/gnome/gconf/gconf.xml.mandatory --type bool --set /apps/gnome-session/options/show_splash_screen false
To set a default value for this preference, use the following command:
gconftool-2 --direct --config-source xml:readwrite:/etc/opt/gnome/gconf/gconf.xml.defaults --type bool --set /apps/gnome-session/options/show_splash_screen false
You can also set other splash image preferences. For more information, see the gnome-session.schemas schema definition file.
To restore the default preference values for a user, use the following command:
gconftool-2 --direct --config-source user-configuration-source --recursive-unset
Replace user-configuration-source with the configuration source
in the .gconf directory in the home directory of the user.
This command resets the values of all preference keys, in all subdirectories, from the user setting to the setting in the default configuration source.
The Configuration Editor (GConf Editor) lets you view and edit the values of the keys stored in the GConf repository.
To open the Configuration Editor:
The Configuration Editor window contains the following panes:
Lets you navigate the directories and subdirectories in the GConf repository. Use this pane to display the keys that you want to modify in the modification pane. The tree pane is on the left side of the window.
Displays the keys in the selected GConf repository directory. Use this pane to select keys that you want to modify, and to modify the values of keys. The modification pane is in the upper part of the right side of the window.
The icons beside the keys in the modification pane indicate what type of value you can
enter for the key. For example, the check mark icon beside the
/system/http_proxy/use_http_proxy key indicates that you can enter a
boolean value for the key.
The icons also indicate if you cannot edit the value of a key. For example, a key icon beside a schema key indicates that you cannot modify the value of the key.
Displays documentation for the currently selected key. Use this pane to get more information about the GConf preference keys.
You can copy the names of keys so that you can paste them into another application. You can also add bookmarks to keys.
Use the tree pane to display the key that you want to modify in the modification pane.
Click the key you want to modify.
To change the value of an integer key or a string key, click the column of the key and then type the new value for the key.
To change the value of a boolean key, click the column of the key.
SUSE Linux Enterprise10 lets you edit menus in either of the following ways:
The Alacarte application enables you to customize the GNOME Main menu. Users can edit their own menus, and administrators can customize the menu for all users with accounts on the computer. The system-wide menu can also be distributed to other computers.
![]() | |
Changes you have made to the Main menu are not overwritten during a subsequent system update. Changes are applied after the latest menu view is generated. | |
This section contains the following information:
Alacarte is not installed when you install SUSE Linux Enterprise Desktop. To install Alacarte:
Click .
YaST Control Center opens.
(Conditional) If prompted, enter the root password.
Click .
In the search box, type alacarte, then click .
Select , then click .
When prompted, insert the specified installation medium.
For example, if you are using CDs, insert SUSE Linux Enterprise Desktop CD 2.
Click .
Wait a few moments while the system checks dependencies, then installs Alacarte.
When asked whether you want to install more packages, click .
Alacarte is now installed and two icons are added to the GNOME Control Center.
Click .
Click .
There are two icons. Mouse over them to determine which is used for system-wide changes and which is used for your own local menu. Use the system-wide version if you are modifying a menu for all users on your system or want to distribute the menu to other computers. Use the regular version to modify your own menu.
The window opens.
You can now edit the menu.
This section describes the following ways you can edit the Main menu:
![]() | |
The first time you use Alacarte, changes to the menu do not take effect until you log out and log back in. After the first time, changes appear immediately when you make them. | |
![]() | |
Some features of Alacarte, such as the ability to nest groups and insert separators, apply only if you use older versions of the GNOME menu. | |
The window is arranged with the Main menu submenus in the list on the left and the items in the selected menu in the list on the right. Groups in a submenu are nested below that submenu. To find an item, click the arrow next to a submenu in the list, select the group containing that item, then locate the item in the list.
For example, to locate the Sound Recorder application:
Start Alacarte as described in Section 10.2.1.2, “Starting Alacarte”.
Click the arrow next to the submenu in the list, then select the group.
Locate Sound Recorder in the list.
You can use Alacarte to change the order in which items appear in the Main menu. For example, you might want to place your frequently used applications at the top of the menu or at the top of their groups to make them easier to find.
To move an item, click it and drag it to a new location in the menu. You can move the item to a new location in the same menu, or drop it on an item in the list to move it to a new menu or group.
Separators serve as visual cues to make it easier to find items in menus.
![]() | |
Separators are not used in the current version of the GNOME menu. Adding a separator will have no effect. However, if you install and use an older version of the GNOME menu, you can use separators. | |
To create a separator:
Select the item above the space where you want the separator to appear.
For help locating an item, see Section 10.2.1.3.1, “Finding Menu Items”.
Click .
The new separator appears beneath the selected item in the list. You can drag the separator to a new location like you would any other menu item. To delete a separator, see Section 10.2.1.3.5, “Deleting Items from the Main Menu”.
To show or hide an item, locate the item in the list, then select or deselect the box next to that item. When you hide an item, it remains in list and can be shown at another time if you decide you want it to appear in the menu. To delete an item from the list, see Section 10.2.1.3.5, “Deleting Items from the Main Menu”.
There are two ways to remove an item from the Main menu:
To remove an item but retain it in the Items list so you can easily add it to the menu, hide the item as explained in Section 10.2.1.3.4, “Showing or Hiding Menu Items”.
To delete an item from the Items list so it can no longer be shown, right-click the item and click .
![]() | |
Separators can not be hidden. They can only be added or deleted. | |
If you want to show a deleted item, you must add it like you would a new application. See Section 10.2.1.3.8, “Adding New Items to the Main Menu” for information about adding an application.
Locate the menu item whose name you want to change, as explained in Section 10.2.1.3.1, “Finding Menu Items”.
Right-click the item, then click .
Replace the current name with the name you want to give the item, then click .
The old name is replaced by the new one in the menu.
A short descriptive name appears beneath the name of each item in the Main menu. This is known as the generic name. To change the generic name:
Locate the menu item whose generic name you want to change, as explained in Section 10.2.1.3.1, “Finding Menu Items”.
Right-click the item, then click .
Replace the current generic name with the generic name you want to give the item, then click .
The old generic name is replaced by the new one in the menu.
You can add a new item to the Main menu. This is especially helpful when you install an application, but it is also useful if you have other applications that do not currently appear on the menu. You can also add a directory, a link, or another type of item to the menu.
To add an application to the Main menu:
In the list, click the arrow next to the menu containing the group where you want to add the application, then select the group.
The contents of that group appear in the list.
Click .
Type a name and generic name for the item.
Click and browse to the item.
Select the item.
Click the list, then select the type of item.
For example, if you are adding a directory, click the list and select . If you are adding an application, leave the default item type, , as is.
(Optional) To assign an icon to the new item, click , then select an icon for the item.
If you do not select an icon, the item appears in the menu without an icon.
Click .
After the item is added to the menu, you can move it to the place where you want it to appear in the menu, as described in Section 10.2.1.3.2, “Rearranging Menu Items”.
When you install an application, it is usually added in its group in the Main menu, as well as to the group.
![]() | |
Some applications do not add themselves to the menu when installed. You can add these applications to the Main menu yourself, using the instructions provided in Section 10.2.1.3.8, “Adding New Items to the Main Menu”. | |
By default, the group holds up to nine items. After the ninth new application is added, subsequent new applications replace the oldest item in the group.
To change the maximum number of applications allowed in the New Applications group:
Alacarte enables you to edit the system-wide Main menu for all users on the system, and distribute it to other computers. These additional systems need not have an identical setup to use the new menu.
![]() | |
Changing the system-wide menu requires administrative privileges for the computer whose menu you want to change. | |
To change a system-wide menu and distribute it:
Open Alacarte, using the launcher for the system-wide menu editor.
See Section 10.2.1.2, “Starting Alacarte” for more information.
Enter the root password.
Make the desired changes to the menu, as described in Section 10.2.1.3, “Editing the Menu”.
Click .
The changes you made now appear for all users of the system.
The changes you make to the system-wide menu are saved in the
/etc/opt/gnome/alacarte-system directory. To use this menu on other
computers:
Copy the /etc/opt/gnome/alacarte-system directory to the other
computers.
Copy the following lines from the /etc/profile.d/xdg-enviroment.sh
file on the original system to the /etc/profile.d/xdg-enviroment.sh file
on the target system:
#START SECTION ADDED BY ALACARTE export XDG_DATA_DIRS=/etc/opt/gnome/alacarte_system:$XDG_DATA_DIRS export XDG_CONFIG_DIRS=/etc/opt/gnome/alacarte_system:$XDG_CONFIG_DIRS #END SECTION ADDED BY ALACARTE
The way in which the GNOME Desktop implements menus enables you to do the following:
Customize the menu hierarchy easily. The menu hierarchy is not based on the file system hierarchy. You can edit a small number of files to customize the menu hierarchy. You do not need to modify your applications or move files.
Install applications easily. You do not need to provide information about the menu hierarchy to applications when you install the applications.
Configure menus so that users cannot modify them.
Menus in the GNOME Desktop use the following components:
A desktop entry file is a data file that provides information about an item in a menu.
This file specifies the details for the item such as a name, a command to run, or an icon. It
also contains keywords which determine the location of the item in the menu hierarchy. Desktop
entry files have a .desktop file extension.
The following is a sample desktop entry file:
[Desktop Entry] Encoding=UTF-8 Name=Calculator Comment=Perform calculations Exec=gcalctool Icon=gcalctool.png Terminal=false Type=Application Categories=GNOME;Application;Utility; X-GNOME-DocPath=gcalctool/gcalctool.xml
The following table describes the most important keys in desktop entry files.
Table 10.7. Desktop Entry File Keys¶
|
Desktop Entry Key |
Description |
|---|---|
|
Encoding |
Specifies the encoding of the desktop entry file. |
|
Name |
Specifies the name of the item. This name is displayed on the item in the menu. |
|
Comment |
Specifies a short description of the item. The comment is displayed as a tooltip when you point to the item in the menu. |
|
Exec |
Specifies a command to execute when you select the item from the menu. |
|
Icon |
Specifies the filename of an icon that represents the item. Does not specify the file extension or the path to the filename. |
|
Terminal |
Specifies whether the command in the Exec key runs in a terminal window. If the value is True, the command runs in a terminal window. If the command does not create a window in which to run, the value of this key must be True. |
|
Type |
Specifies the type of item. This value is one of the following: |
|
Categories |
Specifies the keywords that describe the item. The keywords are separated with semicolons (;). To view a list of the standard category keywords, see the desktop menu specification at freedesktop.org The vfolder information files map the keywords to menus. |
|
X-GNOME-DocPath |
Specifies the help file to display when you select Help on application-name from the menu item pop-up menu. |
For more information on the keys in desktop entry files, see the desktop entry specification at http://www.freedesktop.org.
![]() | |
Panel launchers and desktop objects also use desktop entry files. These desktop entry files provide the same information as for items in a menu. For example, the desktop entry files provide the command to run when a user selects the launcher or object. | |
A directory entry file is a data file that provides information
about a menu. The directory entry file specifies the details for the
menu, such as a name, a tooltip, and an icon. Directory entry files
have a .directory file extension.
The following is a sample directory entry file:
[Desktop Entry] Name=Accessories Comment=Accessories menu Icon=gnome-util.png Type=Directory
The following table describes the most important keys in directory entry files.
Table 10.8. Directory Entry File Keys¶
SUSE Linux Enterprise uses the freedesktop.org menu specification. This specification uses the following files and directories:
Table 10.9. Menu File Locations¶
For more detailed information on adding and editing menu items, see the Desktop Menu Specification Web site.
A theme is a group of coordinated settings that specifies the visual appearance of a part of the GNOME Desktop. Users can select themes to change the appearance of the GNOME Desktop.
A theme contains settings that affect different parts of the GNOME Desktop, as follows:
Determines the visual appearance of windows, panels, and applets. It also determines the visual appearance of the GNOME-compliant interface items that appear on windows, panels, and applets (such as menus, icons, and buttons). Some of the controls setting options that are available are designed for special accessibility needs. Users can select an option for the controls setting from the Controls tabbed section in the Theme preference tool.
Determines the appearance of the frames around windows only. Users can select an option for the window frame setting from the Window Border tabbed section in the Theme preference tool.
Determines the appearance of the icons on panels and the desktop background. Users can select an option for the icon setting from the Icons tabbed section in the Theme preference tool.
Each theme has an index file which defines the characteristics of the theme. The name of
the index file is /opt/gnome/share/themes/theme-name/index.theme.
The following is a sample theme index file:
[Desktop Entry] Type=X-GNOME-Metatheme Name=High Contrast Large Name[es]=Alto contraste grande Comment=Large black-on-white text and icons Comment[es]=Textos e iconos grandes en negro sobre blanco Encoding=UTF-8 [X-GNOME-Metatheme] GtkTheme=HighContrastLargePrint IconTheme=HighContrast MetacityTheme=Atlanta ApplicationFont=sans 18
The following table describes the keys in theme index files:
Table 10.10. Theme Index File Keys¶
You can add a new option for the controls setting in the Theme
preference tool. Controls options reside in the
/opt/gnome/share/themes directory. The typical
structure of a controls option in the file system is as follows.
/opt/gnome/share/themes/
option-name/gtk-2.0/gtkrc
/opt/gnome/share/themes/
option-name/pixmaps/*.*
Typically, a new option for the controls setting is supplied as a
.tar.gz file. To install the new controls option, unzip the
.tar.gz file and then untar the .tar file into the
/opt/gnome/share/themes directory.
Users can install their own options for the controls setting. If a user installs an option
for the controls setting, the option is stored in the $HOME/.themes
directory.
You can add a new option for the window frame setting in the Theme preference tool. Window
frame options reside in the /opt/gnome/share/themes/option-name/metacity-1
directory. The typical structure of a window frame option in the file system is as follows.
/opt/gnome/share/themes/
option-name/metacity-1/metacity-theme-1.xml
/opt/gnome/share/themes/
option-name/metacity-1/*.*
Typically, a new option for the window frame setting is supplied as a
.tar.gz file. To install the new window frame option, unzip the
.tar.gz file and then untar the .tar file into the
/opt/gnome/share/themes directory.
Users can install their own options for the window frame setting. If a user installs an
option for the window frame setting, the option is stored in the
$HOME/.themes directory.
You can add a new option for the icons setting in the Theme preference tool. Icons options
reside in the /opt/gnome/share/icons/option-name directory. The typical
structure of an icons option in the file system is as follows.
/opt/gnome/share/icons/
option-name
/opt/gnome/share/icons/
option-name/icons/*.*
Typically, a new option for the icons setting is supplied as a .tar.gz
file. To install the new icons option, unzip the .tar.gz file and then
untar the .tar file into the /opt/gnome/share/icons
directory.
Users can install their own options for the icons setting. If a user installs an option for
the icons setting, the option is stored in the $HOME/.icons/option-name
directory.
The GNOME Desktop provides several themes that are designed for users with special visual needs. For example, some of the themes are designed for users with low vision. Several versions of icons might be required so that the icon can be displayed properly in each theme.
You might need to install a new icon for an application. When you install a new icon, you must create several versions of the icon so that the icon displays correctly in the themes. You must create several versions of the following types of icon:
Icons that are used within applications in the GNOME Desktop
Icons that are used internally by GTK+ applications or GTK+ stock icons
You can create the icons in several formats (for example, Portable Network Graphic (PNG) format). The suggested size of icons for the desktop environment is 48 x 48 pixels; at this size, most themes can rescale the icons.
When you install a new icon, create the following 48 x 48 pixel versions of the icon:
Regular icon
Low-contrast icon
High-contrast icon
Inverse high-contrast icon
If possible, also create 16 x 16 pixel versions of the each of the icons above, for themes that do not require large print.
Install the icons to the image files location that is specified for
the theme in Section 10.3.2, “Installing a New Controls Option” or Section 10.3.3, “Installing a New Window Frame Option”. For example, to add icons
to the HighContrastLargePrint theme, add the icons to the
/opt/gnome/share/themes/HighContrastLargePrint/pixmaps
directory. Add references to the icons to the relevant theme files. For
example, to add icons to the HighContrastLargePrint theme, add references
to the icons to the
/opt/gnome/share/themes/HighContrastLargePrint/
gtk-2.0/gtkrc file. Modify the gtkrc file for the theme to
associate the icon with a GTK stock icon identifier.
For more information on how to create icons for application launchers and panels, see the Icon Themes.
If the options for the controls setting are not suitable for the needs of your users, you can create a custom controls option.
Create a directory structure for the option in the
/opt/gnome/share/themes directory.
Use the same directory structure that other options use. For example, to create an option that is called SmallPrint, create the following directories:
/opt/gnome/share/themes/SmallPrint
/opt/gnome/share/themes/SmallPrint/gtk-2.0
Locate the gtkrc file that is closest to meeting the needs of your users, then copy the
file to the gtk-2.0 directory of your new option.
Open the gtkrc file in a text editor and modify the attributes of
the interface elements as needed.
(Conditional) If the new option includes images, install the images for the new option in the pixmaps directory of your new option.
If the new option uses images from another option, you do not need to create copies of
the images for the new option. Instead, make sure that the reference to the images in the
pixmap_path entry in the gtkrc file is correct.
Users can now select the new option for the controls setting.
For more information on gtkrc files, see the GTK+ Reference Manual .
The GNOME Desktop uses the fontconfig font configuration and customization library. The
fontconfig library can use all kinds of fonts, including PostScript Type 1 fonts and TrueType*
fonts. The fontconfig library provides a list of all the fonts available on a system. To compile
this list, fontconfig searches the directories listed in the
/etc/fonts/fonts.conf file. To view all the fonts available on a system,
access the fonts:/// location in the file manager on the system.
For more information about the fontconfig library, see the Fontconfig Web site.
The fontconfig library performs font substitution when entire fonts or individual
characters are not present. If the system needs to display a font that is not available,
fontconfig attempts to display another, similar font. For example, if a Web page requests to
display the Verdana font, and that font is not installed on the system, fontconfig displays a
similar font, such as Helvetica. The list of similar fonts is defined in the
/etc/opt/gnome/fonts/fonts.conf file.
If the system needs to display a character that is not present in the selected font, fontconfig attempts to display the character in another, similar font. For example, you might select Bitstream Vera Sans as the font for the Text Editor application. The Bitstream Vera font family does not include Cyrillic characters. If you open a document which contains a Cyrillic character, Text Editor uses a similar font that includes Cyrillic characters to display the character.
The fontconfig library also defines aliases for fonts (for example, serif, sans-serif, and
monospace). When you select one of the aliases for a font, the system uses the first font that
is defined for that alias in the /etc/opt/gnome/fonts/fonts.conf.
Copy the font file to one of the directories in the
/etc/opt/gnome/fonts/fonts.conf file.
Typically, fonts are stored in the /opt/gnome/share/fonts/
directory.
(Conditional) The fontconfig library updates the list of fonts automatically. If the list of fonts is not updated, run the following command:
fc-cache directory-name
Copy the font file to the $HOME/.fonts directory of the user.
If you drag the font file to the fonts:/// location in the file
manager, the font file is copied to the $HOME/.fonts directory.
(Conditional) The fontconfig library updates the list of fonts automatically. If the list of fonts is not updated, run the following command:
fc-cache directory-name
A Multipurpose Internet Mail Extension (MIME) type identifies the format of a file. The MIME type enables applications to read the file. Applications such as Internet browsers and e-mail applications use the MIME type to handle files of different types. For example, an e-mail application can use the MIME type to detect what type of file is attached to an e-mail.
The Nautilus file manager uses MIME types to identify the type of a file. The file manager needs to know the MIME type of a file to perform the following tasks:
Open the file in an appropriate application
Display a string that describes the type of file
Display an appropriate icon to represent the file
Display a list of other applications that can open the file
It is sometimes necessary to work out the correct MIME type for a file. This is usually done by examining the file's name or contents and looking up the correct MIME type in a database. If you add a new application (that is, extend the database), you must make sure that other applications can recognize the files associated with the application. For example, you might want to add the following:
image/png files should be edited using the Gimp.
image/png files should be described in English as Portable Network Graphics files.
Files whose names end in .png should have the type image/png.
You can use a graphical editor (such as MIME-Editor to edit the
database, or you can do it manually by creating a file called
$XDG_DATA_HOME/mime/packages/Override.xml in the format described below.
For information on the XDG_ variables, see the Base Directory
Specification.
When your new application is installed, it should install a file with the application's name
in $XDG_DATA_DIRS/mime/packages. For example, running the
./configure && make install command with the Gimp will create
/usr/local/share/mime/packages/gimp.xml.
This file has the following format:
<?xml version=”1.0” encoding=”UTF-8”?>
<mime-info xmlns=”http://www.freedesktop.org/standards/shared-mime-info”>
<mime-type type=”image/png”>
<comment xml:lang=”en”>PNG image</comment>
<comment xml:lang=”af”>png bleed</comment>
...
<magic priority=”50”>
<match type=”string” value=”\x89PNG” offset=”0”/>
</magic>
<glob pattern=”*.png”/>
</mime-type>
</mime-info>
This provides a comment in two languages, a rule to recognize PNG files by their contents,
and a rule to recognize PNG files by their names. You can provide information about several types
in the single
file. You do not need to provide any
information which is also in the base package. application.xml
You can also add extra elements if they are namespaced to avoid conflicts. For example:
<desktop:can-edit-with>gimp.desktop</desktop:can-edit-with>
This indicates that the named desktop entry file describes an application that can edit image/png files.
Information added to the database should be static (for example, “The Gimp can edit PNG files.”), not configuration (for example, “The Gimp is the preferred editor for PNG files.”). For more information on storing configuration information, see the Shared Configuration System Spec.
After you have installed the
file, run the
update-mime-database command to rebuild the output files. This program checks
that the syntax of your file is correct and merges the information in it with the information in
the other XML files in the application.xml packages directory. It then puts the rules for
recognizing files into one set of files and the information about each type into other files (for
example, $XDG_DATA_DIR/mime/image/png.xml) where other programs can easily
access it.
When the application is uninstalled, the
file is removed. Run
application.xml update-mime-database again to remove the information from the database.
A screensaver is an application that replaces the image on a screen when the screen is not in use. The screensaver application for the GNOME Desktop is XScreenSaver. The following sections describe how to set preferences for the XScreenSaver application and how to modify the displays that are available for the screensaver.
Default screensaver preferences are stored in the XScreenSaver file, located in
/usr/X11R6/lib/X11/app-defaults/XScreenSaver.
To modify screensaver application preferences, users can use the Screensaver preference
tool. When a user modifies the screensaver preferences, the preferences are stored in the home
directory of the user, in the $HOME/.xscreensaver file. For information on
screensaver preferences, see the
GNOME Desktop User Guide
.
Users can also run the /usr/X11R6/bin/xscreensaver-demo command to open the XScreenSaver dialog.
To set default screensaver preferences for all users, modify the XScreenSaver file. You can
also use the XScreenSaver dialog to create a $HOME/.xscreensaver file, then
copy the file to the location of the XScreenSaver file.
To restore the default settings for a user, delete the
$HOME/.xscreensaver file from the home directory of the user. If no
$HOME/.xscreensaver file is present, the default preferences in the
XScreenSaver file are used.
![]() | |
The default display behavior of XScreenSaver is to display a blank screen. The blank screen might confuse users. You might want to change this default display behavior. | |
To activate changes to the screensaver preferences, use the following command to reload screensaver preferences:
xscreensaver-command -restart
The screensaver application allows users to select one or more screensaver displays. A
screensaver display is an application that displays images on the screen of the user when the
screen is not in use. The screensaver displays are listed in the XScreenSaver file and in the
$HOME/.xscreensaver file.
To add a new screensaver display, copy the executable file for the display to the directory
where the displays are located. Add the command for the screensaver display to the XScreenSaver
file or the $HOME/.xscreensaver file. Include any arguments that are
required to run the screensaver display on the whole screen, rather than in a window. For
example, you might want to include the -root option to display the screensaver display on the
whole screen.
To disable a screensaver display, add a Minus sign (-) to the start of the command for the
screensaver display in the preferences file. The following excerpt from a
$HOME/.xscreensaver file shows a disabled Qix (solid) screensaver display:
- “Qix (solid)” qix -root -solid -segments 100
A session occurs between the time that a user logs in to the GNOME Desktop and the time that the user logs out. The session manager starts after the login manager authenticates the user. The session manager lets the user manage the session. For example, a user can save the state of a session and return to that session the next time that he logs in.
At a minimum, the following applications run in a session:
The session manager, gnome-session.
The GConf X settings daemon, gnome-settings-daemon.
The gnome-panel application, which runs the panels in the GNOME Desktop.
The Metacity window manager.
The following table lists the files that contain default session information:
Table 10.11. Default Session Information Files¶
To set default session details for all users, modify the default session file.
To restore the default session settings for a user, delete the session file from the home
directory of the user. If no user session file is present, the default settings in
/opt/gnome/share/gnome/default.session are used.
To save the current session as the default session, users can run the gnome-session-save command.
GNOME also supports autostart. For more information, see Section 10.12, “Starting Applications Automatically”.
This section discusses several preference settings you can change to improve the performance of the GNOME Desktop. You can use the gconftool-2 command to set values for preferences for users. The example commands in this section show how to set values in the user configuration source.
You can also use the --direct and --config-source options
to set mandatory values or default values for preferences. And you can use the gconftool-2
command in a script to set the values of many preferences. For more information on the
gconftool-2 command and the options that are available with the command, see Section 10.1, “Using GConf for Defaults”.
There are a number of preferences that you can set to reduce CPU usage by the GNOME Desktop.
Some window frame theme options load image files to draw the window frame. Other options use simpler techniques to draw the window frame. The Crux window frame option loads image files, but can be slow on systems with limited CPU resources. To reduce CPU usage, use one of the following window frame options:
Atlanta
Esco
The following window frame options also use fewer CPU resources than Crux:
AgingGorilla
Bright
Metabox
![]() | |
Metabox does not work well with inverse controls options such as HighContrastInverse. Use Atlanta with inverse controls options. | |
To change the window frame theme option, use the following command:
gconftool-2 --type string --set /apps/metacity/general/theme option-name
For example, to use Atlanta, run the following command:
gconftool-2 --type string --set /apps/metacity/general/theme Atlanta
Users can also use the Theme preference tool to select the appropriate option.
You can use the Metacity Theme Viewer to measure the performance of a window frame option and to preview the option. To start Metacity Theme Viewer, use the following command:
metacity-theme-viewer option-name
For example, to measure the performance of Atlanta and preview Atlanta, use the following command:
metacity-theme-viewer Atlanta
Some items in menus display an icon beside the item. To turn off this feature, use the following command:
gconftool-2 --type bool --set /desktop/gnome/interface/menus_have_icons false
Users can also use the Menus & Toolbars preference tool to deselect the Show Icons in Menus option.
When users log in to the desktop environment, a splash screen is displayed by default. Icons are displayed on the splash screen while the user logs in. You can turn off the splash screen to reduce CPU usage during login.
To turn off the splash screen, use the following command:
gconftool-2 --type bool --set /apps/gnome-session/options/show_splash_screen false
When users show or hide panels, the panels can show or hide in an animated style. To turn off panel animation, use the following command:
gconftool-2 --type bool --set /apps/panel/global/enable_animations false
Users can also use the Panel preference tool to deselect the Drawer and Panel Animation option.
The Nautilus file manager includes some features that you can modify to improve performance.
The file manager includes performance-related preferences. Each of these preference can take any of the following three values.
Table 10.12. Performance-related Preferences¶
The following table describes the performance preferences for the file manager. For the fastest performance, set the value of the preferences to Never.
Table 10.13. File Manager Performance Preferences¶
The file manager includes preferences that let you turn off the side pane and the toolbar. Turning these off improves file manager performance.
To turn off the side pane, use the following command:
gconftool-2 --type bool --set /apps/nautilus/preferences/start_with_sidebar false
To turn off the toolbar, use the following command:
gconftool-2 --type bool --set /apps/nautilus/preferences/start_with_toolbar false
You can also turn off the location bar. Users can use the Ctrl+L keyboard shortcut to display a location bar when required.
To turn off the location bar, use the following command:
gconftool-2 --type bool --set /apps/nautilus/preferences/start_with_location_bar false
The file manager contains a preference that lets users use Nautilus to manage the desktop. You can disable the desktop to improve performance. However, if you disable the desktop, you cannot
Use the Desktop menu.
Use the file manager to change the pattern or color of the desktop background.
Use the desktop objects, such as Trash. (The desktop objects are not displayed on the desktop.)
To disable the desktop, use the following command:
gconftool-2 --type bool --set /apps/nautilus/preferences/show_desktop false
There are some preferences that you can set to reduce X Window System network traffic on the GNOME Desktop.
Remote display protocols do not transfer every pixel in a block of pixels if all pixels in the block are the same color. To reduce X Window System network traffic, use one of the following window frame options that uses solid colors:
Atlanta
Esco
For information on how to change theme options, see Section 10.8.1.1, “Using Theme Options That Require Less CPU Resources”.
Some items in menus display an icon beside the item. This feature can increase X Window System network traffic if the icon is located on another file system or if the panels are displayed on a remote host.
For information on how to turn off this feature, see Section 10.8.1.2, “Turning Off Display of Icons in Menus”.
Many modern computer systems support 24-bit color (that is, 16,777,216 colors). However, many users still use systems that support only 8-bit color (256 colors). The GNOME Desktop uses the websafe color palette. This palette is a general-purpose palette of 216 colors which is designed to optimize the use of color on systems that support 8-bit color. However, some visual components of the GNOME Desktop are designed for systems that support 24-bit color.
The following display problems might occur on systems that support only 8-bit color:
Windows, icons, and background images might appear grainy. Many themes, background images, and icons use colors that are not in the websafe color palette. The colors that are not in the palette are replaced with the nearest equivalent or a dithered approximation, which causes the grainy appearance.
Applications that do not use the websafe color palette have fewer colors available; therefore, color errors might occur. Some colors might not appear in the user interface of the application, and some applications might crash if the application cannot allocate colors.
Color flashing might occur when users switch between applications that use the websafe color palette and applications that do not use this palette. The applications that do not use the websafe color palette might use a custom colormap. When the custom colormap is used, other visual components might lose colors and then become unviewable.
The following sections describe how to optimize the appearance of the GNOME Desktop for systems that support only 8-bit color.
Some window frame theme options use colors that are in the websafe color palette. Bright and Esco use colors from the websafe color palette and do not have the grainy appearance of other window frame options on 8-bit color displays. Use Bright or Esco for the best color display on 8-bit visual modes.
For information on how to change theme options, see Section 10.8.1.1, “Using Theme Options That Require Less CPU Resources”.
Some items in menus display an icon beside the item. If the icon contains colors that are not in the websafe color palette, this feature can increase the number of colors used.
For information on how to turn off this feature, see Section 10.8.1.2, “Turning Off Display of Icons in Menus”.
You can turn off the splash screen to make more colors available for the GNOME Desktop and for applications.
For information on how to turn off the splash screen, see Section 10.8.1.3, “Turning Off the Splash Screen”.
Use a solid color for the desktop background. This reduces the number of colors used by the GNOME Desktop.
To set a solid color for the background, use the following commands:
gconftool-2 --type string --set /desktop/gnome/background/picture_options none gconftool-2 --type string --set /desktop/gnome/background/color_shading_type solid gconftool-2 --type string --set /desktop/gnome/background/primary_color \#hexadecimal-color
Users can also use the Background preference tool to choose a solid color for the background.
The following table describes the hidden directories that the GNOME Desktop adds to the home directories of users. A hidden directory is a directory that has a name that begins with a period (.).
Table 10.14. Hidden Directories Added to Users’ Home Directories¶
Windows network shares are also referred to as Samba or SMB shares. When you configure a printer on an SMB share, you must enter a username and password for the print queue.
The username and password are stored as unencrypted text in the
/etc/opt/gnome/cups/printers.conf file. This file has read-only permissions
for users with root privileges, so any user with root privileges can read the username and
password for the print queue.
To reduce the impact of possible security violations, make sure that the username and password required to access the print queue is used only for the print queue. This ensures that any possible security violation is restricted to unauthorized use of the print queue.
The GNOME Desktop includes features you can use to restrict access to certain of its functions. These disable (or lockdown) features let you restrict the actions that users can perform on a computer. For example, you might want to prevent command line operations on a computer that is for public use at a trade show.
You disable feature by setting GConf keys (see Section 10.1, “Using GConf for Defaults”). You can also use the Configuration Editor application to set GConf keys in a user configuration source (see Section 10.1.8, “Configuration Editor”).
To disable the lock screen and log out functions, set the
/apps/panel/global/disable_lock_screen key and the
/apps/panel/global/disable_log_out key to True.
When you disable the lock screen and log out functions, the following items are removed from the panels:
Lock Screen and Log Out user menu items from the Main Menu
Lock and Log Out menu items from the Add to Panel > Actions menu
To open this menu, right-click a vacant space on a panel and then click .
Lock Screen and Log Out user menu items from the Actions menu in the Menu Bar applet
Additionally, any Lock Screen buttons and Log Out buttons on panels are disabled.
To disable operations from a command line, set the
/desktop/gnome/lockdown/disable_command_line key to True.
When you disable command line operations, the following changes occur in the user interface:
The Run Application menu item is removed from the following menus:
Main Menu
Actions submenu in the Add to Panel menu
Actions menu in the Menu Bar applet
Any Run buttons on panels are disabled
To disable command line operations, you must also remove menu items that start terminal applications. For example, you might want to remove menu items that contain the following commands:
GNOME Terminal command ( /opt/gnome/bin/gnome-terminal)
/usr/bin/xterm
/usr/bin/setterm
These items are removed from the following menus:
Main Menu
Add to Panel > Launcher From menu
To disable command line operations, you must also disable the Command Line applet. To
disable this applet, add the applet to the /apps/panel/global/disabled_applets
key. When you disable the Command Line applet, it is removed from the Main Menu and the Add to
Panel > Utility menu.
To disable panel configuration, set the /apps/panel/global/locked_down key
to True.
When you disable panel configuration, the following changes occur in the user interface:
The following items are removed from the Panel and Drawer pop-up menus:
Add to Panel
Delete This Panel
Properties
New Panel
The launcher popup menu is disabled.
The following items are removed from the Applet pop-up menu:
Remove from Panel
Lock
Move
The Main Menu pop-up menu is disabled.
The Launcher drag feature is disabled so that users cannot drag launchers to or from panels.
The Panel drag feature is disabled so that users cannot drag panels to new locations.
To automatically start applications in GNOME, use one of the following methods:
To disable an application that starts automatically, add
X-Autostart-enabled=false to the .desktop file.
The GNOME Volume Manager
(gnome-volume-manager) monitors volume-related
events and responds with a user-specified policy. You can use the
GNOME Volume Manager to automatically mount hot-plugged drives and
inserted removable media, automatically run programs, automatically
play audio CDs and video DVDs, and automatically import photos from a
digital camera.
GNOME Volume Manager is started automatically. To disable GNOME Volume Manager, add
X-Autostart-enabled=false to the
/opt/gnome/share/gnome/autostart/gnome-volume-manager.desktop file.
You can use the GConf Editor to configure GNOME Volume Manager settings. Open the GConf
Editor by pressing Alt+F2 to open the Run Application dialog box, type
gconf-editor, then click . GNOME Volume Manager is
located under /desktop/gnome/volume_manager.
To change users’ preferred applications, edit
/etc/opt/gnome/gnome_defaults.conf.
After editing the file, run SuSEconfig --module gnome-vfs2.
Sabayon is a system administration tool you can use to create and apply desktop environment profiles. A profile is a collection of default settings and restrictions that can be applied to either individual users or groups of users. Sabayon lets you edit GConf defaults and mandatory keys using a graphical tool.
Profile definition is done through a graphical session similar to the one a user would be running, only inside a desktop window. You can change properties (such as the desktop background, toolbars, and available applets) in the usual way. Sabayon also detects changes to the default settings in most desktop applications.
Files or documents that are left in the simulated home directory or on the desktop are included in the finished profile. This includes many application-specific databases, such as Tomboy notes. Using this mechanism, it is easy to supply introductory notes or templates in a manner easily accessible to new users.
A user profile can inherit its settings from a parent profile, overriding or adding specific values. This enables hierarchical sets of settings. For example, you can define an Employee profile and derive Artist and Quality Assurance profiles from that.
In addition to providing defaults, Sabayon can also lock down settings. This makes the setting resistant to change by users. For instance, you can specify that the desktop background cannot be changed to something other than the default you provide. It prevents casual tampering with settings, potentially reducing the number of helpdesk calls, and enabling kiosk-like environments. However, it does not provide absolute security and should not be relied on for such.
Sabayon also provides a list of settings for applications and generic user interface elements that have built-in lockdown support, including LibreOffice and the GNOME panel. For example, the panel can be set up to allow only specific applets to be added to it and prevent changing its location or size on the screen. Likewise, the Save menu items can be disabled across all applications that use it, preventing users from saving documents.
The profiles are transferable to other computers. They reside in
/etc/opt/gnome/desktop-profiles/, and each profile is saved in a separate
ZIP file.
Profiles are saved in ZIP files located in
/etc/opt/gnome/desktop-profiles. Each profile you save is stored in a
separate ZIP file as . You can copy or move profiles
to other computers. name-of-the-profile.zip
Click +++.
If you are not logged in as root, type the
root password, then click .
![]() |
Click .
Specify a name for the profile, then click .
Select the profile, then click .
A new desktop session opens in an Xnest window.
![]() |
In the Xnest window, make the changes to the settings that you want.
Each setting you change appears in the Xnest window.
You can choose to make each setting mandatory (click + in the Xnest window), to ignore a setting (click ++), or make a setting the default (don’t select either or ).
To lock settings for users, click + in the Xnest window.
You can choose from the following options:
Panel: Lets you lock down the panels, disable force quit, disable lock screen, disable logout, and disable any of the applets in the list.
LibreOffice: Lets you define the macro security level for LibreOffice documents, load and save options, and user interface options.
To save the profile, click +.
The profile is saved in /etc/opt/gnome/desktop-profiles.
Click + to close the Xnest window, then click to exit Sabayon.
You can apply a profile to individual users or to all users on a workstation.
To add document templates for users, fill in the Templates directory in
a user's home directory. You can do this manually for each user by copying the files into
~/Templates, or system-wide by adding a Templates
directory with documents to /etc/skel before the user is created.
A user creates a new document from a template by right-clicking the desktop and selecting .