Only a system administrator can customize both mandatory and default desktop preferences. However, a standard user can customize only the default desktop preferences. For information about default and mandatory desktop preferences, see Desktop Preferences.
The following types of optimizations can be customized:.
GConf based optimizations – For information about customizing GConf based optimizations, see Customizing GConf Based Optimizations.
Optimizations for the Mozilla Firefox – For information about customizing Mozilla Firefox, see Customizing Mozilla Firefox Optimizations.
Desktop preferences are managed by using GConf. The value of the desktop preferences that are used by the Oracle Solaris 11 Desktop is priority-based. The following table shows the preference value that is used by the desktop.
|
For example, if the application/gconf/multi-user-desktop SMF service sets the value of the /desktop/gnome/background/draw_background preference to false and the user overrides the same setting and sets the value to true, the effective value of the setting that is used by the desktop is true. This value is used because the value that is set by the user for the default setting has a higher priority than the value that is set by the SMF service.
Similarly, in the case of mandatory settings, if a system administrator has modified a setting before enabling the SMF service, the effective value of the setting that is used by the desktop is the one that is set by the system administrator and not the SMF service.
A standard user can modify any of the default settings. The settings can be customized by using GUI tools such as “Appearance Preferences” that is available in the desktop. For settings that cannot be accessed by using the GUI tools, use the gconftool-2 command line utility to modify the settings.
The following examples show the usage of the gconftool-2 command-line utility.
To read the current value of a desktop preference, type:.
$ gconftool-2 --get /desktop/gnome/lockdown/allowed_applications
To set the value of a desktop preference, type:.
$ gconftool-2 --type string --set /desktop/gnome/font_rendering/hinting "full"
To unset the value of a desktop preference, type:.
$ gconftool-2 --unset /desktop/gnome/font_rendering/hinting
You can save the GConf settings in an XML file and provide this file as an input to the gconftool-2 utility. The gconftool-2 configures settings based on the information present in the XML file.
The following examples show the usage of the gconftool-2 utility with XML files.
To read the current value of a setting, type:.
$ gconftool-2 --dump /desktop/gnome/lockdown > /tmp/settings.xml
To set the value of a setting, type:.
$ gconftool-2 --load /tmp/settings.xml
To unset the value of a setting, type:.
$ gconftool-2 --unload /tmp/settings.xml
The following sample XML file shows the values that are set by using the gconftool-2 utility.
<?xml version="1.0"?> <gconfentryfile> <entrylist base="/desktop/gnome/background"> <entry> <key>draw_background</key> <value> <bool>true</bool> </value> </entry> <entry> <key>picture_options</key> <value> <string>zoom</string> </value> </entry> </entrylist> </gconfentryfile>
A system administrator can modify any of the default and mandatory desktop preferences. The changes made by a system administrator affects all users.
gconf.xml.admin.defaults.
gconf.xml.admin.mandatory.
local-defaults.path.
local-mandatory.path.
xml:readonly:/etc/gconf/gconf.xml.admin.defaults
xml:readonly:/etc/gconf/gconf.xml.admin.mandatory
For example:.
$ gconftool-2 --direct --config-source xml:readwrite:/etc/gconf/gconf.xml.admin.defaults --load /tmp/default-settings.xml $ gconftool-2 --direct --config-source xml:readwrite:/etc/gconf/gconf.xml.admin.mandatory --load /tmp/mandatory-settings.xml
For example:.
$ chmod -R 755 /etc/gconf/gconf.xml.admin.defaults $ chmod -R 755 /etc/gconf/gconf.xml.admin.mandatory
As a system administrator you can restrict the type of applications that users can start by modifying the value of the /desktop/gnome/lockdown/allowed_applications preference. This preference specifies the list of applications that users are allowed to start. Based on your requirements, you can add or remove applications from this list.
The following example show how to add a new application to the list of allowed applications.
Example 1 Adding a New Application to the List of Allowed ApplicationsConsider that you have installed a new application /usr/bin/new_app . To make this new application available to users, you must add this application to the list of allowed applications by updating the value of the /desktop/gnome/lockdown/allowed_applications preference. The following example shows how to update the value of the preference.
Copy the existing value of the /desktop/gnome/lockdown/allowed_applications preference to an XML file.
$ gconftool-2 --dump /desktop/gnome/lockdown > /tmp/new-settings.xml
In the /tmp/new-settings.xml file, add the new application to the list of allowed_applications.
<value> <string>/usr/bin/new_app</string> </value>
Create the gconf.xml.admin.mandatory directory in the /etc/gconf directory.
Create the local-mandatory.path file in the /etc/gconf/2 directory.
Add the following line in the local-mandatory.path file.
xml:readonly:/etc/gconf/gconf.xml.admin.mandatory
Save the new settings in the mandatory directory created in Step 3.
For example:.
$ gconftool-2 --direct --config-source xml:readwrite:/etc/gconf/gconf.xml.admin.mandatory --load /tmp/new-settings.xml
Provide read permissions to users who can use the setting.
For example:.
chmod -R 755 /etc/gconf/gconf.xml.admin.mandatory
Similarly, to remove an application from the list of “allowed applications” you must remove the entry of the application from the XML file and load the new settings.
Only a system administrator can override the optimized values that are set for the Mozilla Firefox web browser. The optimized values are present in the /usr/lib/firefox/defaults/pref/all-multi-user-desktop.js file.
The following code shows the values in the all-multi-user-desktop.js file.
// Disable "safe browsing" feature that hogs CPU, HDD, etc. pref("browser.safebrowsing.enabled", false); pref("browser.safebrowsing.malware.enabled", false); // Limit the "location-bar suggestions" pref("browser.urlbar.maxRichResults", 3); // Disable offline/disk caching of web pages pref("browser.cache.offline.enable", false); pref("browser.cache.disk.enable", false); // Change the default cache: pref("browser.cache.memory.enable",true); pref("browser.cache.memory.capacity", 1024);
To override the optimized values present in the all-multi-user-desktop.js file, create a new file in the /usr/lib/firefox/defaults/pref/ directory with new values. The file name should be alphabetically higher than the all-multi-user-desktop.js file. For example, you can name the file as all-admin.js.