Contents
This chapter introduces GNOME configuration options which administrators can use to adjust system-wide settings, such as customizing menus, installing themes, configuring fonts, changing preferred applications, and locking down capabilities.
These configuration options are stored in the GConf system. Access the GConf system with tools such as the gconftool-2 command line interface or the gconf-editor GUI tool.
The GNOME desktop manages its configuration with GConf. It is a
hierarchically structured database or registry where the user can change
their own settings, and the system administrator can set default or
mandatory values for all users. You reach GConf settings by specifying
access paths, such as
/desktop/gnome/background/picture_filename—this,
for example, is the key holding the file name of the desktop background
picture.
Use the graphical gconf-editor if you want to
browse through all options conveniently. For a short usage description of
gconf-editor, see Section 6.1.1, “The Graphical gconf-editor”. If you need a
scriptable solution, see Section 6.1.2, “The gconftool-2 Command Line Interface”.
![]() | GNOME Control Center Dialogs |
|---|---|
Accessing the Gconf System directly can result in an unusable system, if done without care. Inexperienced users who want to adjust some common desktop features only, are recommended to use the GNOME Control Center configuration dialogs. To start the GNOME Control Center, click +. For more information, see Section “The Control Center” (Chapter 3, Customizing Your Settings, ↑GNOME User Guide). | |
gconf-editor lets you browse through GConf settings and change them interactively. To start gconf-editor in the default view, click + and then in the group click .
By default, users can change settings for their own desktop, and the administrator can prepare settings for specifying default or mandatory values. For example, if you want to enable the typing break feature as mandatory for all users, proceed as follows:
Start gconf-editor as root
in the command line.
In the tree pane on the left, expand
/desktop/gnome/typing_break.
Right-click and select . Once this is done, you can manage this feature.
Open the window by clicking +.
In the tree pane of the window
expand /desktop/gnome/typing_break, click
.
Close the window to save the setting by clicking +.
For more information about gconf-editor, see the Configuration Editor Manual at http://library.gnome.org/users/gconf-editor/stable/.
To change settings from the command line or within scripts, use gconftool-2. A few examples follow:
As root, use the following command to list the
values of all keys:
gconftool-2 --recursive-list /
If you are interested in a subset only, specify an access path such as
/desktop/gnome/typing_break:
gconftool-2 --recursive-list /desktop/gnome/typing_break
To list mandatory settings:
gconftool-2 --recursive-list \ --config-source xml:readwrite:/etc/gconf/gconf.xml.mandatory /
To set a mandatory setting such as
typing_break:
gconftool-2 \ --config-source xml:readwrite:/etc/gconf/gconf.xml.mandatory \ --type bool \ --set /desktop/gnome/typing_break/enabled true
To unset a mandatory setting:
gconftool-2 \ --config-source xml:readwrite:/etc/gconf/gconf.xml.mandatory \ --unset /desktop/gnome/typing_break/enabled
For default settings, use
/etc/gconf/gconf.xml.default.
For more information about gconftool-2, see the GNOME Desktop System Administration Guide, Section GConf Command Line Tool at http://library.gnome.org/admin/system-admin-guide/stable/gconf-6.html.en and the gconftool-2 manpage (man gconftool-2).
Control the default items shown in various sections of the main menu () by customizing the following files:
/usr/share/gnome-main-menu/applications.xbel: List of default favorite applications.
/usr/share/gnome-main-menu/documents.xbel: List of default favorite documents.
/usr/share/gnome-main-menu/system-items.xbel: Items shown in the system section.
With gconf-editor, you can customize the number of displayed items:
/desktop/gnome/applications/main-menu/file-area/min_recent_items: Minimal number of recent items.
/desktop/gnome/applications/main-menu/file-area/max_total_items: Maximal number of total items.
You can customize the application browser in various ways, for example
its behavior when users launch items or the number of items displayed in
the category. Look up the keys
/desktop/gnome/applications/main-menu/ab_* with
gconf-editor.
For more information, see the Section Customizing Menus in the GNOME Desktop System Administration Guide at http://library.gnome.org/admin/system-admin-guide/stable/menustructure-0.html.en.
To automatically start applications in GNOME, use one of the following methods:
To run applications for each user:
Put .desktop files in
/usr/share/gnome/autostart.
To run applications for an individual user:
Put .desktop files in
~/.config/autostart.
To disable an application that starts automatically, add
X-Autostart-enabled=false to the
.desktop file.
Nautilus (nautilus) monitors volume-related events and responds with a user-specified policy. You can use Nautilus to automatically mount hot-plugged drives and inserted removable media, automatically run programs, and play audio CDs or video DVDs. Nautilus can also automatically import photos from a digital camera.
System administrators can set system-wide defaults. For more information, see Section 6.5, “Changing Preferred Applications”.
To change users' preferred applications, edit
/etc/gnome_defaults.conf. Find further hints within
this file.
After editing the file, run SuSEconfig --module glib2.
For more information about MIME types, see http://www.freedesktop.org/Standards/shared-mime-info-spec.
Sabayon is a system administration tool to create and apply desktop environment profiles. Desktop 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 lock down support, including OpenOffice.org, 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/desktop-profiles/, and each profile is saved in
a separate ZIP file.
Profiles are saved in ZIP files located in
/etc/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 +), to ignore a setting (click ++), or make a setting default (do not selecting either or ).
To lock settings for users, click + in the Xnest window.
You can choose from the following options:
General: Lets you disable the command line, printing, print setup, and the save-to-disk feature.
Panel: Lets you lock down the panels, disable force quit, disable lock screen, disable log out, and disable any of the applets in the list.
OpenOffice.org: Lets you define the macro security level for OpenOffice.org documents, load and save options, and user interface options.
To save the profile, click +.
The profile is saved in /etc/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.
Click +++.
If you are not logged in as root, type the
root password, then click
.
Select the profile you want to apply, then click .
Select the users you want to use this profile.
To apply this profile to all users on this workstation, click .
Click .
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 .
Sometimes it is desired to remove or disable desktop features or user access to the underlying operating system. GNOME offers so-called lock down features to change the desktop accordingly. Technically, you set GConf keys to implement those changes.
For example, if you open gconf-editor, you can see lock down keys for the
main menu in
/desktop/gnome/applications/main-menu/lock-down/application_browser_link_visible.
There are also descriptions for all the keys. Other lock down keys are:
If set, then terminals are not shown in the main menu and the AppBrowser.
If set, main menu does not show these items.
Find Firefox lock down keys in
/apps/firefox/lockdown.
For more information, see the “Desktop Administrators' Guide to GNOME Lockdown and Preconfiguration” by Sayamindu Dasgupta: http://library.gnome.org/admin/deployment-guide/.
For more information, see http://library.gnome.org/admin/.