Contents


On-line Guides
All Guides
Linux for Beginners
Office Productivity
Linux Installation
Linux Security
Linux Utilities
Linux Virtualization
Linux Kernel
System/Network Admin
Programming
Scripting Languages
Development Tools
Web Development
GUI Toolkits/Desktop
Databases
Mail Systems

How To Guides
Xen Virtualization
General System Admin
Linux Security
Linux Filesystems
Web Servers
Graphics & Desktop
PC Hardware
Problem Solutions

 

To Set Preference Values

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. Ensure that all users are logged out before you change preference values for users.

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-key value

For example, to set wwwproxy.xyz.com as the mandatory HTTP proxy host, run the following command:

gconftool-2 --direct \
  --config-source xml:readwrite:/etc/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, run the following command:

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

The user can override this preference value.

Caution

Before you change mandatory preference values or default preference values for users, you must ensure that all users are logged out.


Previous
GConf Command Line Tool
GNOME 2.14 Desktop System Administration Guide Next
Setting General Preferences

 
 
  Published under the terms of the GNU General Public License Design by Interspire