home *** CD-ROM | disk | FTP | other *** search
/ Mac Easy 2010 May / Mac Life Ubuntu.iso / casper / filesystem.squashfs / usr / share / gnome / help / system-admin-guide / C / gconf.xml < prev    next >
Encoding:
Text File  |  2009-04-10  |  57.4 KB  |  1,321 lines

  1. <chapter id="gconf-0">
  2.   <title>Using GConf</title>
  3.   <highlights>
  4.     <para>The information in this chapter describes how to use <application>GConf</application> to manage user preferences.</para>
  5.   </highlights>
  6.   <sect1 id="gconf-1">
  7.     <title>Introduction to GConf</title>
  8.     <indexterm>
  9.       <primary>GConf</primary>
  10.       <secondary>introduction</secondary>
  11.     </indexterm>
  12.     <para><application>GConf</application> simplifies the administration of preferences
  13. for GNOME Desktop users. <application>GConf</application> enables system administrators
  14. to do the following:</para>
  15.     <itemizedlist>
  16.       <listitem>
  17.         <para>Set mandatory values for particular preferences for all users.
  18. In this way, system administrators can control whether users can update particular
  19. preferences.</para>
  20.       </listitem>
  21.       <listitem>
  22.         <para>Set default values for particular preferences for all users. </para>
  23.       </listitem>
  24.       <listitem>
  25.         <para>Use suggested values for preferences that are specified in
  26. definition files for the preferences.</para>
  27.       </listitem>
  28.       <listitem>
  29.         <para>Read documentation on each preference. </para>
  30.       </listitem>
  31.     </itemizedlist>
  32.     <para><application>GConf</application> also notifies applications when a preference
  33. value changes, locally or across a network. In this way, when you change a
  34. preference, all applications that use the preference are immediately updated.</para>
  35.     <para><application>GConf</application> has the following components: </para>
  36.     <itemizedlist>
  37.       <listitem>
  38.         <para>A repository of user preferences. </para>
  39.       </listitem>
  40.       <listitem>
  41.         <para>A daemon, <command>gconfd-2</command>.</para>
  42.       </listitem>
  43.       <listitem>
  44.         <para>A command line tool, <command>gconftool-2</command>.</para>
  45.       </listitem>
  46.     </itemizedlist>
  47.   </sect1>
  48.   <sect1 id="gconf-24">
  49.     <title>GConf Repository</title>
  50.     <indexterm>
  51.       <primary>GConf</primary>
  52.       <secondary>repository</secondary>
  53.     </indexterm>
  54.     <para>Each preference in the <application>GConf</application> repository is
  55. expressed as a key-value pair. A <firstterm>GConf preference key</firstterm>
  56. is an element in the repository that corresponds to an application preference.
  57. For example, the <systemitem>/apps/gnome-session/options/show_splash_screen</systemitem>
  58. preference key corresponds to the <guilabel>Show splash screen on login</guilabel>
  59. option in the <application>Sessions</application> preference tool.  The GNOME
  60. Desktop user interface does not contain all of the preference keys in the <application>GConf</application> repository. For example, the <application>Panel</application>
  61. preference tool does not contain an option that corresponds to the <systemitem>/apps/panel/global/tooltips_enabled</systemitem> key.</para>
  62.     <para>The repository is structured like a simple hierarchical file system.
  63. The repository contains the following:</para>
  64.     <itemizedlist>
  65.       <listitem>
  66.         <para>Directories that correspond to applications that use the <application>GConf</application> repository. For example, the file system contains the
  67. directory <systemitem>/apps/metacity</systemitem>. </para>
  68.       </listitem>
  69.       <listitem>
  70.         <para>Subdirectories that correspond to categories of preferences.
  71. For example, the file system contains the directory <systemitem>/apps/metacity/general</systemitem>.</para>
  72.       </listitem>
  73.       <listitem>
  74.         <para>Special files that list the preference keys in the directory,
  75. and contain information about the keys. For example, a file that contains
  76. information about the keys that relate to the HTTP proxy preferences is in
  77. the directory <systemitem>/system/http_proxy</systemitem>. </para>
  78.       </listitem>
  79.       <listitem>
  80.         <para>A <systemitem>/schemas</systemitem> directory that contains files
  81. that describe all of the preference keys.</para>
  82.       </listitem>
  83.     </itemizedlist>
  84.     <para>Preference keys typically have simple values such as strings, integers,
  85. or lists of strings and integers. The format of the preference key in the
  86. repository depends on the backend module that is used to read the repository.
  87. The following is an example of the <systemitem>/desktop/gnome/interface/font_name</systemitem> preference key when an Extensible Markup Language (XML) backend
  88. module is used to read the repository:</para>
  89.     <programlisting><![CDATA[<entry name="font_name" mtime="1038323555" muser="user123" type="string">
  90. <stringvalue>Sans 10</stringvalue></entry>]]></programlisting>
  91.     <note>
  92.       <para>When this guide refers to a preference key, the path to the key
  93. is added to the name of the key. For example, the <systemitem>font_name</systemitem>
  94. preference key in the <systemitem>/desktop/gnome/interface</systemitem> subdirectory
  95. is referred to as <systemitem>/desktop/gnome/interface/font_name</systemitem>.</para>
  96.     </note>
  97.     <sect2 id="gconf-26">
  98.       <title>GConf Configuration Sources</title>
  99.       <indexterm>
  100.         <primary>GConf</primary>
  101.         <secondary>configuration sources</secondary>
  102.       </indexterm>
  103.       <para>The <application>GConf</application> repository contains
  104. a series of storage locations that are called <firstterm>configuration sources</firstterm>. The configuration sources are listed in the <firstterm>GConf
  105. path file</firstterm>. The location of the <application>GConf</application>
  106. path file is <systemitem>/etc/gconf/<replaceable>gconf-version-number</replaceable>/path</systemitem>. Each user has a path file. The path file specifies the following
  107. information for each configuration source:</para>
  108.       <itemizedlist>
  109.         <listitem>
  110.           <para>The backend module to use to read the repository. </para>
  111.         </listitem>
  112.         <listitem>
  113.           <para>The permissions on the repository.</para>
  114.         </listitem>
  115.         <listitem>
  116.           <para>The location of the repository.</para>
  117.         </listitem>
  118.       </itemizedlist>
  119.       <para>The <application>GConf</application> path file also contains <systemitem>include</systemitem> instructions. By default, the contents of the <application>GConf</application> path file are as follows: </para>
  120.       <programlisting>xml:readonly:/etc/gconf/gconf.xml.mandatory
  121. include /etc/gconf/2/local-mandatory.path
  122. include "$(HOME)/.gconf.path"
  123. include /etc/gconf/2/local-defaults.path
  124. xml:readwrite:$(HOME)/.gconf
  125. xml:readonly:/etc/gconf/gconf.xml.defaults</programlisting>
  126.       <para>When <application>GConf</application> searches for a preference value, <application>GConf</application> reads the configuration sources in the order specified
  127. in the path file. The following table describes the configuration sources
  128. in the path file:</para>
  129.       <informaltable frame="topbot">
  130.         <tgroup cols="2" colsep="0" rowsep="0">
  131.           <colspec colwidth="31.29*"/>
  132.           <colspec colwidth="68.71*"/>
  133.           <thead>
  134.             <row rowsep="1">
  135.               <entry>
  136.                 <para>Configuration Source</para>
  137.               </entry>
  138.               <entry>
  139.                 <para>Description</para>
  140.               </entry>
  141.             </row>
  142.           </thead>
  143.           <tbody>
  144.             <row>
  145.               <entry valign="top">
  146.                 <para>Mandatory</para>
  147.               </entry>
  148.               <entry valign="top">
  149.                 <para>The permissions on this configuration source are set to read only. Users cannot
  150. overwrite the values in this source, so the preferences in the source are
  151. mandatory.</para>
  152.               </entry>
  153.             </row>
  154.             <row>
  155.               <entry valign="top">
  156.                 <para>User</para>
  157.               </entry>
  158.               <entry valign="top">
  159.                 <para>This configuration source is stored in the <filename>.gconf</filename> directory
  160. in the home directory of the user. When the user sets a preference, the new
  161. preference information is added to this location. </para>
  162.                 <para>You can use
  163. the <application>Configuration Editor</application> to modify the user configuration
  164. source.</para>
  165.               </entry>
  166.             </row>
  167.             <row>
  168.               <entry valign="top">
  169.                 <para>Default</para>
  170.               </entry>
  171.               <entry valign="top">
  172.                 <para>This configuration source contains the default preference settings.</para>
  173.               </entry>
  174.             </row>
  175.           </tbody>
  176.         </tgroup>
  177.       </informaltable>
  178.       <para>The sequence of the configuration sources in the path file ensures that
  179. mandatory preference settings override user preference settings. The sequence
  180. also ensures that user preference settings override default preference settings.
  181. That is, <application>GConf</application> applies preferences in the following
  182. order of priority:</para>
  183.       <orderedlist>
  184.         <listitem>
  185.           <para>Mandatory preferences </para>
  186.         </listitem>
  187.         <listitem>
  188.           <para>User-specified preferences </para>
  189.         </listitem>
  190.         <listitem>
  191.           <para>Default preferences</para>
  192.         </listitem>
  193.       </orderedlist>
  194.       <para>The <systemitem>include</systemitem> instructions in the <application>GConf</application> path file enable system administrators to specify other configuration
  195. sources. </para>
  196.       <informaltable frame="topbot">
  197.         <tgroup cols="2" colsep="0" rowsep="0">
  198.           <colspec colwidth="50*"/>
  199.           <colspec colwidth="50*"/>
  200.           <thead>
  201.             <row rowsep="1">
  202.               <entry>
  203.                 <para>Included Configuration Source</para>
  204.               </entry>
  205.               <entry>
  206.                 <para>Description</para>
  207.               </entry>
  208.             </row>
  209.           </thead>
  210.           <tbody>
  211.             <row>
  212.               <entry valign="top">
  213.                 <para>
  214.                   <filename>/etc/gconf/2/local-mandatory.path</filename>
  215.                 </para>
  216.               </entry>
  217.               <entry valign="top">
  218.                 <para>Use this configuration
  219. source to store mandatory preference values for a particular system.</para>
  220.               </entry>
  221.             </row>
  222.             <row>
  223.               <entry valign="top">
  224.                 <para>
  225.                   <filename>$(HOME)/.gconf.path</filename>
  226.                 </para>
  227.               </entry>
  228.               <entry valign="top">
  229.                 <para>The user specifies the location of  the configuration
  230. source in the home directory, in a file that is called <filename>.gconf.path</filename>.</para>
  231.               </entry>
  232.             </row>
  233.             <row>
  234.               <entry valign="top">
  235.                 <para>
  236.                   <filename>/etc/gconf/2/local-defaults.path</filename>
  237.                 </para>
  238.               </entry>
  239.               <entry valign="top">
  240.                 <para>Use this configuration
  241. source to store default preference values for a particular system.</para>
  242.               </entry>
  243.             </row>
  244.           </tbody>
  245.         </tgroup>
  246.       </informaltable>
  247.     </sect2>
  248.     <sect2 id="gconf-27">
  249.       <title>GConf Schemas</title>
  250.       <indexterm>
  251.         <primary>GConf</primary>
  252.         <secondary>schemas</secondary>
  253.       </indexterm>
  254.       <indexterm>
  255.         <primary>GConf</primary>
  256.         <secondary>schema keys</secondary>
  257.       </indexterm>
  258.       <indexterm>
  259.         <primary>GConf</primary>
  260.         <secondary>schema objects</secondary>
  261.       </indexterm>
  262.       <indexterm>
  263.         <primary>schemas</primary>
  264.         <secondary>description</secondary>
  265.       </indexterm>
  266.       <indexterm>
  267.         <primary>schemas</primary>
  268.         <secondary>schema keys</secondary>
  269.       </indexterm>
  270.       <indexterm>
  271.         <primary>schemas</primary>
  272.         <secondary>schema objects</secondary>
  273.       </indexterm>
  274.       <para>A <firstterm>GConf schema</firstterm> is a collective term
  275. for a <firstterm>GConf schema key</firstterm> and a <firstterm>GConf schema
  276. object</firstterm>. The following table describes schema keys and schema objects
  277. and the relationship of these items to preference keys:</para>
  278.       <informaltable frame="topbot">
  279.         <tgroup cols="2" colsep="0" rowsep="0">
  280.           <colspec colname="colspec0" colwidth="24.31*"/>
  281.           <colspec colname="colspec1" colwidth="75.69*"/>
  282.           <thead>
  283.             <row rowsep="1">
  284.               <entry>
  285.                 <para>Item</para>
  286.               </entry>
  287.               <entry>
  288.                 <para>Description</para>
  289.               </entry>
  290.             </row>
  291.           </thead>
  292.           <tbody>
  293.             <row>
  294.               <entry colname="colspec0" valign="top">
  295.                 <para>Preference key</para>
  296.               </entry>
  297.               <entry colname="colspec1" valign="top">
  298.                 <para>An element in the <application>GConf</application> repository that corresponds to an application preference.</para>
  299.               </entry>
  300.             </row>
  301.             <row>
  302.               <entry valign="top">
  303.                 <para>Schema key</para>
  304.               </entry>
  305.               <entry valign="top">
  306.                 <para>A key that stores a schema object for a preference key. </para>
  307.               </entry>
  308.             </row>
  309.             <row>
  310.               <entry valign="top">
  311.                 <para>Schema object</para>
  312.               </entry>
  313.               <entry valign="top">
  314.                 <para>An element in a configuration source that contains information for a preference
  315. key, such as the following:</para>
  316.                 <itemizedlist>
  317.                   <listitem>
  318.                     <para>The name of the application that uses the preference key.</para>
  319.                   </listitem>
  320.                   <listitem>
  321.                     <para>The type of value required for the preference key, for example
  322. integer, boolean, and so on.</para>
  323.                   </listitem>
  324.                   <listitem>
  325.                     <para>A default value for the preference key. </para>
  326.                   </listitem>
  327.                   <listitem>
  328.                     <para>Brief documentation on the preference key.</para>
  329.                   </listitem>
  330.                 </itemizedlist>
  331.               </entry>
  332.             </row>
  333.           </tbody>
  334.         </tgroup>
  335.       </informaltable>
  336.       <para>The following table gives examples of a preference key, a schema key,
  337. and a schema object:</para>
  338.       <informaltable frame="topbot">
  339.         <tgroup cols="2" colsep="0" rowsep="0">
  340.           <colspec colname="colspec0" colwidth="24.31*"/>
  341.           <colspec colname="colspec1" colwidth="75.69*"/>
  342.           <thead>
  343.             <row rowsep="1">
  344.               <entry>
  345.                 <para>Item</para>
  346.               </entry>
  347.               <entry>
  348.                 <para>Example</para>
  349.               </entry>
  350.             </row>
  351.           </thead>
  352.           <tbody>
  353.             <row>
  354.               <entry colname="colspec0" valign="top">
  355.                 <para>Preference key</para>
  356.               </entry>
  357.               <entry colname="colspec1" valign="top">
  358.                 <para>
  359.                   <systemitem>/desktop/gnome/interface/font_name</systemitem>
  360.                 </para>
  361.               </entry>
  362.             </row>
  363.             <row>
  364.               <entry colname="colspec0" valign="top">
  365.                 <para>Schema key</para>
  366.               </entry>
  367.               <entry colname="colspec1" valign="top">
  368.                 <para>
  369.                   <systemitem>/schemas/desktop/gnome/interface/font_name</systemitem>
  370.                 </para>
  371.               </entry>
  372.             </row>
  373.             <row>
  374.               <entry valign="top">
  375.                 <para>Schema object</para>
  376.               </entry>
  377.               <entry valign="top">
  378.                 <programlisting><![CDATA[<schema>
  379.   <applyto>/desktop/gnome/interface/font_name</applyto>
  380.   <key>/schemas/desktop/gnome/interface/font_name</key>
  381.   <owner>gnome</owner>
  382.   <type>string</type>
  383.   <default>Sans 10</default>
  384.   <locale name="C">
  385.     <short>Default font</short>
  386.       <long>Name of the default font used by gtk+.</long>
  387.   </locale>
  388. </schema>]]></programlisting>
  389.               </entry>
  390.             </row>
  391.           </tbody>
  392.         </tgroup>
  393.       </informaltable>
  394.       <para>You can associate a schema key with a preference key. For example, the
  395. following <systemitem>/desktop/gnome/interface/font_name</systemitem> key includes
  396. a schema key:</para>
  397.       <programlisting><![CDATA[<entry name="font_name" mtime="1034873859"
  398. schema="/schemas/desktop/gnome/interface/font_name"/>]]></programlisting>
  399.       <para>When you associate a schema key with a preference key, the preference
  400. uses the suggested value that is specified in the schema object of the schema
  401. key. The suggested value is contained in the <sgmltag><default></sgmltag>
  402. element in the schema object. By default, all the preference keys in the default
  403. configuration source are associated with schema keys.</para>
  404.       <para>Typically, schemas are stored in the default configuration source. </para>
  405.     </sect2>
  406.     <sect2 id="gconf-2">
  407.       <title>GConf Schema Definition Files</title>
  408.       <indexterm>
  409.         <primary>GConf</primary>
  410.         <secondary>schema definition files</secondary>
  411.         <tertiary>introduction</tertiary>
  412.       </indexterm>
  413.       <indexterm>
  414.         <primary>schemas</primary>
  415.         <secondary>schema definition files</secondary>
  416.         <tertiary>introduction</tertiary>
  417.       </indexterm>
  418.       <para>Schemas are generated from <firstterm>schema definition
  419. files</firstterm>. A schema definition file defines the characteristics of
  420. all of the keys in a particular application. Schema definition files have
  421. a <filename>.schemas</filename> extension.</para>
  422.       <para>The schema definition files are included in the <filename>/etc/gconf/schemas</filename> directory. You can use the schema definition files to create a
  423. new configuration source.</para>
  424.       <para>Some schema definition files correspond closely to a part of the GNOME
  425. Desktop user interface. For example, <filename>system_http_proxy.schemas</filename>
  426. corresponds to the <application>Network Proxy</application> preference tool. Other schema definition files contain
  427. preference keys that are not present in the GNOME Desktop user interface.
  428. For example, the <systemitem>/apps/panel/global/tooltips_enabled</systemitem> key
  429. is not present in the user interface. </para>
  430.       <para>Some parts of the GNOME Desktop user interface contain preferences that
  431. represent preference keys from more than one schema definition file. For example,
  432. the <application>Keyboard Shortcuts</application> preference tool contains preferences that represent
  433. keys from the <filename>panel-global-config.schemas</filename> and <filename>metacity.schemas</filename> files.</para>
  434.     </sect2>
  435.   </sect1>
  436.   <sect1 id="gconf-25">
  437.     <title>GConf Daemon</title>
  438.     <indexterm>
  439.       <primary>gconfd</primary>
  440.       <see>GConf daemon</see>
  441.     </indexterm>
  442.     <indexterm>
  443.       <primary>GConf</primary>
  444.       <secondary>daemon</secondary>
  445.     </indexterm>
  446.     <para>The <application>GConf</application> daemon is called <command>gconfd-2</command>. The <application>GConf</application> daemon notifies applications when a preference value changes.
  447. For example, you might select to show only icons in toolbars in the <application>Menus & Toolbars</application> preference tool. When you select this option
  448. in the preference tool, the toolbars on all open applications are updated
  449. instantly. The <application>GConf</application> daemon can operate locally,
  450. or across a network.</para>
  451.     <para>An instance of the <application>GConf</application> daemon is started
  452. for each user. The <application>GConf</application> daemon does not have to
  453. deal with complex problems such as authentication and data security. When
  454. the <application>GConf</application> daemon starts, the daemon loads the <application>GConf</application> path file. The <application>GConf</application> daemon
  455. manages all access between applications and the configuration sources.</para>
  456.     <para>When an application requests the value of a preference key, the daemon
  457. searches the configuration sources as follows:</para>
  458.     <orderedlist>
  459.       <listitem>
  460.         <para>Search for the value of the preference key in each configuration
  461. source, in the order specified in the path file. If the value is found, return
  462. the value.</para>
  463.       </listitem>
  464.       <listitem>
  465.         <para>If a value is not found, search for the schema key that corresponds
  466. to the preference key in each configuration source, in the order specified
  467. in the path file.</para>
  468.       </listitem>
  469.       <listitem>
  470.         <para>If the schema key is found, check the value of the schema
  471. key.</para>
  472.       </listitem>
  473.       <listitem>
  474.         <para>If the value of the schema key is a schema object, return
  475. the suggested value in the <sgmltag><default></sgmltag> element of the
  476. schema object.</para>
  477.       </listitem>
  478.     </orderedlist>
  479.     <para>The <application>GConf</application> daemon also caches preference key
  480. values. All applications use this cache, so applications only need to access
  481. the configuration sources once.</para>
  482.     <para>To terminate the <application>GConf</application> daemon, run the following
  483. command:</para>
  484.     <screen><userinput>gconftool-2 --shutdown</userinput></screen>
  485.   </sect1>
  486.   <sect1 id="gconf-6">
  487.     <title>GConf Command Line Tool</title>
  488.     <anchor id="gconf-TBL-7"/>
  489.     <indexterm>
  490.       <primary>gconftool-2</primary>
  491.       <see>GConf command line tool</see>
  492.     </indexterm>
  493.     <indexterm>
  494.       <primary>GConf</primary>
  495.       <secondary>command line tool</secondary>
  496.     </indexterm>
  497.     <para><application>GConf</application> includes a
  498. command line tool, <command>gconftool-2</command>. You can use the <command>gconftool-2</command> command to perform the following tasks: </para>
  499.     <itemizedlist>
  500.       <listitem>
  501.         <para>Set the values of keys.</para>
  502.       </listitem>
  503.       <listitem>
  504.         <para>Display the values of keys.</para>
  505.       </listitem>
  506.       <listitem>
  507.         <para>Install schemas from schema definition files when you install
  508. an application.</para>
  509.       </listitem>
  510.     </itemizedlist>
  511.     <para>For example, use the following command to display the values of all
  512. keys in the <systemitem>/desktop/gnome</systemitem> directory and subdirectories.</para>
  513.     <screen><userinput>gconftool-2 --recursive-list /desktop/gnome</userinput></screen>
  514.     <para>Below are listed some of the options that you can
  515. use with the <command>gconftool-2</command> command.  For detailed command line options, 
  516. please see <ulink url="man:gconftool-2(1)">man:gconftool-2(1)</ulink>.</para>
  517.     <variablelist>
  518.       <title>gconftool-2 Command Options</title>
  519.       <varlistentry>
  520.         <term>
  521.             <option>--all-dirs</option>
  522.         </term>
  523.         <listitem>
  524.           <para>Lists all subdirectories in a
  525.     directory that you specify.</para>
  526.         </listitem>
  527.       </varlistentry>
  528.       <varlistentry>
  529.         <term>
  530.             <option>--all-entries</option>
  531.         </term>
  532.         <listitem>
  533.           <para>Displays the values of all keys
  534.     in a directory that you specify.</para>
  535.         </listitem>
  536.       </varlistentry>
  537.       <varlistentry>
  538.         <term>
  539.             <option>--config-source=<replaceable>configuration-source</replaceable></option>
  540.         </term>
  541.         <listitem>
  542.           <para>Use this option with the <option>--direct</option> option
  543.     to specify a configuration source to use. If you do not specify a configuration
  544.     source with this option, the command runs on all configuration sources in
  545.     the path file.</para>
  546.         </listitem>
  547.       </varlistentry>
  548.       <varlistentry>
  549.         <term>
  550.             <option>--direct</option>
  551.         </term>
  552.         <listitem>
  553.           <para>Use this option with the <option>--config-source</option> option to access a configuration source directly.
  554.     When you use this option, <application>GConf</application> bypasses the server.
  555.     Ensure that the <application>GConf</application> daemon, <command>gconfd-2</command>, is not running before you use this option.</para>
  556.         </listitem>
  557.       </varlistentry>
  558.       <varlistentry>
  559.         <term>
  560.             <option>--dump</option>
  561.         </term>
  562.         <listitem>
  563.           <para>Generates a list that contains all preference
  564.     keys in a <application>GConf</application> repository directory that you specify.
  565.     The list contains XML descriptions of all the keys. The list is contained
  566.     in a <sgmltag><gconfentryfile></sgmltag> element. </para>
  567.           <para>For example,
  568.     you can redirect the output from this option to generate a file that lists
  569.     all keys that are related to your panel configuration. You can use the <option>--load</option> option with this file.</para>
  570.         </listitem>
  571.       </varlistentry>
  572.       <varlistentry>
  573.         <term>
  574.             <option>--get</option>
  575.         </term>
  576.         <listitem>
  577.           <para>Displays the value of a preference key that you specify.
  578.     Also displays the values of the elements in the schema object for a schema
  579.     key that you specify.</para>
  580.         </listitem>
  581.       </varlistentry>
  582.       <varlistentry>
  583.         <term>
  584.             <option>--help</option>
  585.         </term>
  586.         <listitem>
  587.           <para>Displays a help message about the <command>gconftool-2</command> command, and the options that you can use with the <command>gconftool-2</command> command.</para>
  588.         </listitem>
  589.       </varlistentry>
  590.       <varlistentry>
  591.         <term>
  592.             <option>--load=<replaceable>filename</replaceable></option>
  593.         </term>
  594.         <listitem>
  595.           <para>Use this option to sets the values of preference keys in the current directory
  596.     in a configuration source to the values in the file that you specify. The
  597.     file that you specify must contain XML descriptions of the keys, in a <literal><gconfentryfile></literal> element.</para>
  598.         </listitem>
  599.       </varlistentry>
  600.       <varlistentry>
  601.         <term>
  602.             <option>--long-desc=<replaceable>description</replaceable></option>
  603.         </term>
  604.         <listitem>
  605.           <para>Use this option with the <option>--set-schema</option>
  606.     option to specify a long description for a schema key. </para>
  607.         </listitem>
  608.       </varlistentry>
  609.       <varlistentry>
  610.         <term>
  611.             <option>--makefile-install-rule</option>
  612.         </term>
  613.         <listitem>
  614.           <para>Installs schema definition files to applications.</para>
  615.         </listitem>
  616.       </varlistentry>
  617.       <varlistentry>
  618.         <term>
  619.             <option>--owner=<replaceable>owner</replaceable></option>
  620.         </term>
  621.         <listitem>
  622.           <para>Use this option with the <option>--set-schema</option> option to specify
  623.     an owner for a schema key. </para>
  624.         </listitem>
  625.       </varlistentry>
  626.       <varlistentry>
  627.         <term>
  628.             <option>--recursive-list</option>
  629.         </term>
  630.         <listitem>
  631.           <para>Displays the values of all preference keys in all
  632.     subdirectories in a directory that you specify.</para>
  633.         </listitem>
  634.       </varlistentry>
  635.       <varlistentry>
  636.         <term>
  637.             <option>--recursive-unset</option>
  638.         </term>
  639.         <listitem>
  640.           <para>Resets
  641.     the values of all preference keys, in all subdirectories in a directory, from
  642.     the user setting to the setting in the default configuration source.</para>
  643.         </listitem>
  644.       </varlistentry>
  645.       <varlistentry>
  646.         <term>
  647.             <option>--set</option>
  648.         </term>
  649.         <listitem>
  650.           <para>Sets the value of a preference key, and writes the value
  651.     to the user configuration source. Use the <option>--type</option> option
  652.     with the <option>--set</option> option to specify the data type of the value
  653.     that you want to set. For example, the following command sets the value of
  654.     the <systemitem>/apps/gnome-terminal/profiles/Default/background_color</systemitem>
  655.     key in the user configuration source:</para>
  656.           <screen><userinput>gconftool-2 \
  657.   --set "/apps/gnome-terminal/profiles/Default/background_color" \
  658.   --type string "#000000"</userinput></screen>
  659.           <para>You can also use the <option>--direct</option> option and the <option>--config-source</option> option
  660.     with the <option>--set</option> option to write a value to another configuration
  661.     source.</para>
  662.         </listitem>
  663.       </varlistentry>
  664.       <varlistentry>
  665.         <term>
  666.             <option>--set-schema</option>
  667.         </term>
  668.         <listitem>
  669.           <para>Sets the value of an attribute
  670.     in a schema key, and writes the value to the default configuration source.</para>
  671.           <para>Use the following options with the <option>--set-schema</option>
  672.     option to specify the attribute that you want to update:</para>
  673.           <itemizedlist>
  674.             <listitem>
  675.               <para>
  676.                 <option>--type</option>
  677.               </para>
  678.             </listitem>
  679.             <listitem>
  680.               <para>
  681.                 <option>--short-desc</option>
  682.               </para>
  683.             </listitem>
  684.             <listitem>
  685.               <para>
  686.                 <option>--long-desc</option>
  687.               </para>
  688.             </listitem>
  689.             <listitem>
  690.               <para>
  691.                 <option>--owner</option>
  692.               </para>
  693.             </listitem>
  694.           </itemizedlist>
  695.           <para>For example, the following command sets the short description
  696.     in the schema key for the <systemitem>/apps/gnome-terminal/profiles/Default/background_color</systemitem> key:</para>
  697.           <screen><userinput>gconftool-2 \
  698.   --set-schema  "/schemas/apps/gnome-terminal/profiles/Default/background_color" \
  699.   --short-desc "Default  background color of terminal"</userinput></screen>
  700.         </listitem>
  701.       </varlistentry>
  702.       <varlistentry>
  703.         <term>
  704.             <option>--short-desc=<replaceable>description</replaceable></option>
  705.         </term>
  706.         <listitem>
  707.           <para>Use this option with the <option>--set-schema</option>
  708.     option to specify a short description for a schema key. </para>
  709.         </listitem>
  710.       </varlistentry>
  711.       <varlistentry>
  712.         <term>
  713.             <option>--shutdown</option>
  714.         </term>
  715.         <listitem>
  716.           <para>Terminates the <application>GConf</application> daemon.</para>
  717.         </listitem>
  718.       </varlistentry>
  719.       <varlistentry>
  720.         <term>
  721.             <option>--type=<replaceable>data-type</replaceable></option>
  722.         </term>
  723.         <listitem>
  724.           <para>Use this option to specify the data type when you set a
  725.     value of a preference key. You can also use this option when you set the value
  726.     of an attribute in a schema key. The following is a list of valid data types:</para>
  727.           <itemizedlist>
  728.             <listitem>
  729.               <para>
  730.                 <type>bool</type>
  731.               </para>
  732.             </listitem>
  733.             <listitem>
  734.               <para>
  735.                 <type>float</type>
  736.               </para>
  737.             </listitem>
  738.             <listitem>
  739.               <para>
  740.                 <type>int</type>
  741.               </para>
  742.             </listitem>
  743.             <listitem>
  744.               <para>
  745.                 <type>list</type>
  746.               </para>
  747.             </listitem>
  748.             <listitem>
  749.               <para>
  750.                 <type>pair</type>
  751.               </para>
  752.             </listitem>
  753.             <listitem>
  754.               <para>
  755.                 <type>string</type>
  756.               </para>
  757.             </listitem>
  758.           </itemizedlist>
  759.         </listitem>
  760.       </varlistentry>
  761.       <varlistentry>
  762.         <term>
  763.             <option>--unset</option>
  764.         </term>
  765.         <listitem>
  766.           <para>Resets the value of a preference
  767.     key from the user setting to the setting in the default configuration source.</para>
  768.         </listitem>
  769.       </varlistentry>
  770.       <varlistentry>
  771.         <term>
  772.             <option>--usage</option>
  773.         </term>
  774.         <listitem>
  775.           <para>Displays a brief help message
  776.     about the <command>gconftool-2</command> command, and the options that you
  777.     can use with the <command>gconftool-2</command> command.</para>
  778.         </listitem>
  779.       </varlistentry>
  780.     </variablelist>
  781.   </sect1>
  782.   <sect1 id="gconf-7">
  783.     <title>To Set Preference Values</title>
  784.     <indexterm>
  785.       <primary>GConf</primary>
  786.       <secondary>preference values, setting</secondary>
  787.     </indexterm>
  788.     <indexterm>
  789.       <primary>preference values</primary>
  790.       <secondary>setting
  791. with GConf</secondary>
  792.     </indexterm>
  793.     <para>You can set a mandatory value or a
  794. default value for a preference key. Before you change mandatory preference
  795. values or default preference values for users, you must ensure that the <application>GConf</application> daemon is not running for any user. Ensure that all users
  796. are logged out before you change preference values for users.</para>
  797.     <para>To set a mandatory value or a default value for a preference key, use
  798. the <command>gconftool-2</command> command, as follows:</para>
  799.     <screen><userinput>gconftool-2 --direct \
  800.   --config-source <replaceable>configuration-source</replaceable> \
  801.   --type <replaceable>data-type</replaceable> \
  802.   --set <replaceable>preference-key</replaceable> <replaceable>value</replaceable></userinput></screen>
  803.     <para>For example, to set <literal>wwwproxy.xyz.com</literal> as the mandatory
  804. HTTP proxy host, run the following command:</para>
  805.     <screen><userinput>gconftool-2 --direct \
  806.   --config-source xml:readwrite:/etc/gconf/gconf.xml.mandatory \
  807.   --type string \
  808.   --set /system/http_proxy/host wwwproxy.xyz.com</userinput></screen>
  809.     <para>The user cannot override this preference value.</para>
  810.     <para>You can also use the <command>gconftool-2</command> command to set default
  811. values. For example, to set the default number of workspaces to five, run
  812. the following command:</para>
  813.     <screen><userinput>gconftool-2 --direct \
  814.   --config-source xml:readwrite:/etc/gconf/gconf.xml.defaults \
  815.   --type int \
  816.   --set /apps/metacity/general/num_workspaces 5</userinput></screen>
  817.     <para>The user can override this preference value.</para>
  818.     <caution>
  819.       <para>Before you change mandatory preference values or default preference
  820. values for users, you must ensure that all users are logged out.</para>
  821.     </caution>
  822.   </sect1>
  823.   <sect1 id="gconf-8">
  824.     <title>Setting General Preferences</title>
  825.     <para>The following sections describe how to assign mandatory or default values
  826. to general preferences.</para>
  827.     <sect2 id="gconf-10">
  828.       <title>To Set HTTP Proxy Preferences</title>
  829.       <indexterm>
  830.         <primary>GConf</primary>
  831.         <secondary>HTTP proxy, setting</secondary>
  832.       </indexterm>
  833.       <indexterm>
  834.         <primary>HTTP proxy</primary>
  835.         <secondary>setting with
  836. GConf</secondary>
  837.       </indexterm>
  838.       <para>To set HTTP proxy preferences, you modify
  839. the values of the preference keys in the <systemitem>/system/http_proxy/</systemitem>
  840. location. For example, to set a mandatory value for the HTTP proxy host, run
  841. the following command:</para>
  842.       <screen><userinput>gconftool-2 --direct \
  843.   --config-source xml:readwrite:/etc/gconf/gconf.xml.mandatory \
  844.   --type string \
  845.   --set /system/http_proxy/host <replaceable>proxy-name</replaceable></userinput></screen>
  846.       <para>To set a default value for the HTTP proxy host, run the following command: </para>
  847.       <screen><userinput>gconftool-2 --direct \
  848.   --config-source xml:readwrite:/etc/gconf/gconf.xml.defaults \
  849.   --type string \
  850.   --set /system/http_proxy/host <replaceable>proxy-name</replaceable></userinput></screen>
  851.       <para>You can also set other HTTP proxy-related preferences. For information
  852. on the other HTTP proxy preferences, see the <filename>system_http_proxy.schemas</filename> schema definition file.</para>
  853.     </sect2>
  854.     <sect2 id="gconf-11">
  855.       <title>To Set Print Manager Preferences</title>
  856.       <para>To set print manager preferences, you modify the values of the preference
  857. keys in the <systemitem>/apps/gnome-print-manager</systemitem> location. For example,
  858. if you do not want users to view the print jobs of other users, set a mandatory
  859. value as follows: </para>
  860.       <indexterm>
  861.         <primary>GConf</primary>
  862.         <secondary>print manager, setting</secondary>
  863.       </indexterm>
  864.       <indexterm>
  865.         <primary>print manager</primary>
  866.         <secondary>setting
  867. with GConf</secondary>
  868.       </indexterm>
  869.       <screen><userinput>gconftool-2 --direct \
  870.   --config-source xml:readwrite:/etc/gconf/gconf.xml.mandatory \
  871.   --type bool \
  872.   --set /apps/gnome-print-manager/show_all_jobs false</userinput></screen>
  873.       <para>To set a default value for this preference, run the following command:</para>
  874.       <screen><userinput>gconftool-2 --direct \
  875.   --config-source xml:readwrite:/etc/gconf/gconf.xml.defaults \
  876.   --type bool \
  877.   --set /apps/gnome-print-manager/show_all_jobs false</userinput></screen>
  878.       <para>You can also set other print manager preferences. For information on
  879. the other print manager preferences, see the <filename>gnome-print-manager.schemas</filename> schema definition file.</para>
  880. <!--gnome-print-manager isn't in Mercury. Is there a replacement?-->
  881.     </sect2>
  882.     <sect2 id="gconf-12">
  883.       <title>To Set the Number of Workspaces</title>
  884.       <indexterm>
  885.         <primary>GConf</primary>
  886.         <secondary>number of workspaces, setting</secondary>
  887.       </indexterm>
  888.       <indexterm>
  889.         <primary>workspaces</primary>
  890.         <secondary>setting number with GConf</secondary>
  891.       </indexterm>
  892.       <para>To set a mandatory
  893. number of workspaces, use the following command:</para>
  894.       <screen><userinput>gconftool-2 --direct \
  895.   --config-source xml:readwrite:/etc/gconf/gconf.xml.mandatory \
  896.   --type int \
  897.   --set /apps/metacity/general/num_workspaces <replaceable>integer</replaceable></userinput></screen>
  898.       <para>To set a default number of workspaces, use the following command:</para>
  899.       <screen><userinput>gconftool-2 --direct \
  900.   --config-source xml:readwrite:/etc/gconf/gconf.xml.defaults \
  901.   --type int \
  902.   --set /apps/metacity/general/num_workspaces <replaceable>integer</replaceable></userinput></screen>
  903.       <para>You can also set other window manager preferences. For information on
  904. the other window manager preferences, see the <filename>metacity.schemas</filename>
  905. schema definition file.</para>
  906.     </sect2>
  907.     <sect2 id="gconf-16">
  908.       <title>To Set Keyboard Accessibility Preferences</title>
  909.       <indexterm>
  910.         <primary>GConf</primary>
  911.         <secondary>keyboard accessibility, setting</secondary>
  912.       </indexterm>
  913.       <indexterm>
  914.         <primary>keyboard</primary>
  915.         <secondary>setting accessibility preferences with GConf</secondary>
  916.       </indexterm>
  917.       <para>To set keyboard accessibility preferences, you modify the values of the preference
  918. keys in the <systemitem>/desktop/gnome/accessibility/keyboard</systemitem> location.
  919. For example, if you want to set a mandatory value so that keyboard accessibility
  920. features are enabled, run the following command:</para>
  921.       <screen><userinput>gconftool-2 --direct \
  922.   --config-source xml:readwrite:/etc/gconf/gconf.xml.mandatory \
  923.   --type bool \
  924.   --set /desktop/gnome/accessibility/keyboard/enable true</userinput></screen>
  925.       <para>To set a default value for this preference, run the following command:</para>
  926.       <screen><userinput>gconftool-2 --direct \
  927.   --config-source xml:readwrite:/etc/gconf/gconf.xml.defaults \
  928.   --type bool \
  929.   --set /desktop/gnome/accessibility/keyboard/enable false</userinput></screen>
  930.       <para>You can also set other keyboard accessibility preferences. For information
  931. on the other keyboard accessibility preferences, see the <filename>desktop_gnome_accessibility_keyboard.schemas</filename> schema definition file.</para>
  932.     </sect2>
  933.     <sect2 id="gconf-18">
  934.       <title>To Set Keyboard Shortcut Preferences</title>
  935.       <indexterm>
  936.         <primary>GConf</primary>
  937.         <secondary>keyboard shortcuts, setting</secondary>
  938.       </indexterm>
  939.       <indexterm>
  940.         <primary>keyboard</primary>
  941.         <secondary>setting shortcut preferences with GConf</secondary>
  942.       </indexterm>
  943.       <para>To set
  944. keyboard shortcut preferences, you modify the values of preference keys in <systemitem>/apps/metacity/global_keybindings</systemitem> location. For example, you might
  945. want users to use only the <keycombo><keycap>Alt</keycap><keycap>F3</keycap></keycombo> keyboard
  946. shortcut to open the <guilabel>Run Application</guilabel> dialog. To set this
  947. mandatory value, run the following command:</para>
  948.       <screen><userinput>gconftool-2 --direct \
  949.   --config-source xml:readwrite:/etc/gconf/gconf.xml.mandatory \
  950.   --type string \
  951.   --set /apps/metacity/global_keybindings/panel_run_dialog '<Alt>F3'</userinput></screen>
  952.       <para>You can also set other keyboard shortcut preferences. For information
  953. on the other keyboard shortcut preferences, see the <filename>metacity.schemas</filename> schema definition file.</para>
  954.     </sect2>
  955.     <sect2 id="gconf-14">
  956.       <title>Setting Panel and Panel Object Preferences</title>
  957.       <indexterm>
  958.         <primary>GConf</primary>
  959.         <secondary>panel object preferences, setting</secondary>
  960.       </indexterm>
  961.       <indexterm>
  962.         <primary>GConf</primary>
  963.         <secondary>panel
  964. preferences, setting individual </secondary>
  965.       </indexterm>
  966.       <indexterm>
  967.         <primary>panels</primary>
  968.         <secondary>preferences, individual, setting with GConf</secondary>
  969.       </indexterm>
  970.       <para>The <filename>panel-default-setup.entries</filename> file
  971. specifies the following details of the panels in the GNOME Desktop:</para>
  972.       <itemizedlist>
  973.         <listitem>
  974.           <para>Number of panels.</para>
  975.         </listitem>
  976.         <listitem>
  977.           <para>Types of the panels.</para>
  978.         </listitem>
  979.         <listitem>
  980.           <para>Properties of the panels.</para>
  981.         </listitem>
  982.         <listitem>
  983.           <para>Contents of the panels.</para>
  984.         </listitem>
  985.       </itemizedlist>
  986.       <para>The configuration of individual panels and of panel objects is a complex
  987. task. To configure individual panels and panel objects, you must first understand
  988. the structure of the <filename>panel-default-setup.entries</filename> file.
  989. For more information on the <filename>panel-default-setup.entries</filename>
  990. file, see the next section.</para>
  991.       <para>To set preferences for individual panels and panel objects, you must
  992. set the values of many preferences in a configuration source. The easiest
  993. way to set the values of panel preferences is to use the <command>gconftool-2</command> command with the <option>--dump</option> and <option>--load</option> options. For more information on how to set preferences for panels
  994. and objects on panels, see <xref linkend="gconf-3"/>.</para>
  995.       <sect3 id="gconf-23">
  996.         <title>Specifying Individual Panels and Panel Objects</title>
  997.         <indexterm>
  998.           <primary>GConf</primary>
  999.           <secondary>schema definition files</secondary>
  1000.           <tertiary>panel and panel object</tertiary>
  1001.         </indexterm>
  1002.         <indexterm>
  1003.           <primary>schemas</primary>
  1004.           <secondary>schema definition files</secondary>
  1005.           <tertiary>panel and panel object</tertiary>
  1006.         </indexterm>
  1007.         <para>The file <filename>panel-default-setup.entries</filename> contains sections that specify panels and panel contents. The <filename>panel-default-setup.entries</filename> file specifies values for schema keys.
  1008. The <filename>panel-default-setup.entries</filename> file resides in the <filename>/etc/gconf/schemas</filename> directory. </para>
  1009.         <para>The <filename>panel-default-setup.entries</filename> file is structured
  1010. as follows:</para>
  1011.         <orderedlist>
  1012.           <listitem>
  1013.             <para>Keys that specify the general structure of panels, applets,
  1014. and other panel objects in the GNOME Desktop. The following keys specify the
  1015. number of panels, panel objects, and applets that appear in the GNOME Desktop:</para>
  1016.             <itemizedlist>
  1017.               <listitem>
  1018.                 <para>
  1019.                   <systemitem>/apps/panel/default_setup/general/toplevel_id_list</systemitem>
  1020.                 </para>
  1021.               </listitem>
  1022.               <listitem>
  1023.                 <para>
  1024.                   <systemitem>/apps/panel/default_setup/general/object_id_list</systemitem>
  1025.                 </para>
  1026.               </listitem>
  1027.               <listitem>
  1028.                 <para>
  1029.                   <systemitem>/apps/panel/default_setup/general/applet_id_list</systemitem>
  1030.                 </para>
  1031.               </listitem>
  1032.             </itemizedlist>
  1033.             <para>The keys also assign identifiers to each panel, panel object, and applet.
  1034. For example, the following sample from <filename>panel-default-setup.entries</filename> specifies that one panel appears in the GNOME Desktop:</para>
  1035.             <programlisting><![CDATA[<entry>
  1036.   <key>toplevel_id_list</key>
  1037.   <schema_key>/schemas/apps/panel/general/toplevel_id_list</schema_key>
  1038.   <value>
  1039.     <list type="string">
  1040.       <value>
  1041.         <string>bottom_panel</string>
  1042.       </value>
  1043.     </list>
  1044.   </value>
  1045. </entry>]]></programlisting>
  1046.             <para>In the <filename>panel-default-setup.entries</filename> file, the identifier <systemitem>bottom_panel</systemitem> identifies the bottom edge panel.</para>
  1047.           </listitem>
  1048.           <listitem>
  1049.             <para>Keys that specify the properties of the panels. The panel
  1050. property keys are structured as follows:</para>
  1051.             <programlisting>/apps/panel/default_setup/toplevels/<replaceable>panel-name</replaceable>/<replaceable>panel-property-key</replaceable></programlisting>
  1052.             <para>For example, the key <systemitem>/apps/panel/default_setup/toplevels/bottom_panel/size</systemitem> specifies the size of the bottom panel. </para>
  1053.           </listitem>
  1054.           <listitem>
  1055.             <para>Keys that specify the panel objects, the panel object properties,
  1056. and the panels in which the objects reside. For example, the following sample
  1057. from <filename>panel-default-setup.entries</filename> specifies a <guimenu>Main Menu</guimenu> object at the left side of the bottom panel:</para>
  1058.             <programlisting><![CDATA[<entrylist base="/apps/panel/default_setup/objects/main_menu">
  1059.   <entry>
  1060.     <key>object_type</key>
  1061.     <schema_key>/schemas/apps/panel/objects/object_type</schema_key>
  1062.     <value>
  1063.       <string>menu-object</string>
  1064.     </value>
  1065.   </entry>
  1066.   <entry>
  1067.     <key>toplevel_id</key>
  1068.     <schema_key>/schemas/apps/panel/objects/toplevel_id</schema_key>
  1069.     <value>
  1070.       <string>bottom_panel</string>
  1071.     </value>
  1072.   </entry>
  1073.   <entry>
  1074.     <key>position</key>
  1075.     <schema_key>/schemas/apps/panel/objects/position</schema_key>
  1076.     <value>
  1077.       <int>0</int>
  1078.     </value>
  1079.   </entry>
  1080.   <!-- Possibly more entry elements -->
  1081. </entrylist>]]></programlisting>
  1082.           </listitem>
  1083.           <listitem>
  1084.             <para>Keys that specify the applets, the applet preferences, and
  1085. the panels in which the applets reside. For example, the following sample
  1086. from <filename>panel-default-setup.entries</filename> specifies the <application>Window List</application> applet, in the bottom panel:</para>
  1087.             <programlisting><![CDATA[<entrylist base="/apps/panel/default_setup/applets/window_list">
  1088.   <entry>
  1089.     <key>object_type</key>
  1090.     <schema_key>/schemas/apps/panel/objects/object_type</schema_key>
  1091.     <value>
  1092.       <string>bonobo-applet</string>
  1093.     </value>
  1094.   </entry>
  1095.   <entry>
  1096.     <key>toplevel_id</key>
  1097.     <schema_key>/schemas/apps/panel/objects/toplevel_id</schema_key>
  1098.     <value>
  1099.       <string>bottom_panel</string>
  1100.     </value>
  1101.   </entry>
  1102.   <entry>
  1103.     <key>position</key>
  1104.     <schema_key>/schemas/apps/panel/objects/position</schema_key>
  1105.     <value>
  1106.       <int>2</int>
  1107.     </value>
  1108.   </entry>
  1109.   <!-- Possibly more entry elements -->
  1110.   <entry>
  1111.     <key>bonobo_iid</key>
  1112.     <schema_key>/schemas/apps/panel/objects/bonobo_iid_type</schema_key>
  1113.     <value>
  1114.       <string>OAFIID:GNOME_WindowListApplet</string>
  1115.     </value>
  1116.   </entry>
  1117. </entrylist>]]></programlisting>
  1118.             <para>The OAFIID is a unique identifier for an applet. To find the OAFIID
  1119. for a particular applet, see the <filename>.server</filename> file for the
  1120. applet in the <filename>/usr/lib/bonobo/servers</filename> directory. For
  1121. example, the following excerpt from <filename>GNOME_Wncklet_Factory.server</filename> shows the OAFIID for the <application>Window List</application>
  1122. applet:</para>
  1123.             <programlisting><![CDATA[<oaf_server iid="OAFIID:GNOME_WindowListApplet" 
  1124. type="factory" location="OAFIID:GNOME_Wncklet_Factory">]]></programlisting>
  1125.           </listitem>
  1126.         </orderedlist>
  1127.       </sect3>
  1128.       <sect3 id="gconf-3">
  1129.         <title>To Set Preferences for Individual Panels and Panel Objects</title>
  1130.         <para>To set the preferences for a panel and the objects on a panel perform
  1131. the following steps:</para>
  1132.         <orderedlist>
  1133.           <listitem>
  1134.             <para>Log in to a GNOME session, and configure the panels as required.</para>
  1135.           </listitem>
  1136.           <listitem>
  1137.             <para>Use the <option>--dump</option> option with the <command>gconftool-2</command> command line tool to generate a file that contains an
  1138. XML description of your panel configuration. The <option>--dump</option>
  1139. option generates a list that contains all preference keys in a <application>GConf</application> repository directory that you specify. </para>
  1140.             <para>For example, the following command creates an XML description of the
  1141. default panel configuration in a file called <filename>my-panel-setup.entries</filename>:</para>
  1142.             <screen><userinput>gconftool-2 --dump /apps/panel > my-panel-setup.entries</userinput></screen>
  1143.           </listitem>
  1144.           <listitem>
  1145.             <para>Open the <filename>my-panel-setup.entries</filename> file
  1146. in a text editor, and modify the file as required.</para>
  1147.             <para>For example, you might want to change the location of the desktop entry
  1148. files. The following is an excerpt from a file generated with the <option>--dump</option> option:</para>
  1149.             <programlisting><![CDATA[<entry>
  1150.   <key>objects/object_16/launcher_location</key>
  1151.   <schema_key>/schemas/apps/panel/objects/launcher_location</schema_key>
  1152.   <value>
  1153.     <string>hadjaha-00adce02f7.desktop</string>
  1154.   </value>
  1155. </entry>]]></programlisting>
  1156.             <para>In the sample above, you might want to change the reference to <filename>hadjaha-00adce02f7.desktop</filename> to another desktop entry file that is
  1157. available globally.</para>
  1158.             <para>When you generate a panel configuration with the <option>--dump</option>
  1159. option, the positions of the panel objects are absolute positions. You might
  1160. want to change the positions of panel objects from absolute positions to relative
  1161. positions. The object at the extreme left of a panel has a <systemitem>position</systemitem> value of <literal>0</literal>. The next object has a <systemitem>position</systemitem> value of <literal>1</literal>, and so on. If you want object
  1162. positions to be relative to the right side of the panel, set the value of
  1163. the <systemitem>right_stick</systemitem> key to <literal>true</literal>. </para>
  1164. <!--Give full key name for position.-->
  1165.           </listitem>
  1166.           <listitem>
  1167.             <para>Use the <option>--load</option> option with the <command>gconftool-2</command> command line tool to set the values of the default configuration
  1168. source to the values in the <filename>my-panel-setup.entries</filename> file.
  1169. For example, the following command sets the values of the keys in the default
  1170. configuration source to the values of the corresponding keys in <filename>my-panel-setup.entries</filename>:</para>
  1171.             <screen><userinput>gconftool-2 --direct \
  1172.   --config-source xml:readwrite:/etc/gconf/gconf.xml.defaults \
  1173.   --load my-panel-setup.entries</userinput></screen>
  1174.           </listitem>
  1175.         </orderedlist>
  1176.       </sect3>
  1177.     </sect2>
  1178.   </sect1>
  1179.   <sect1 id="gconf-9">
  1180.     <title>Setting Look-and-Feel Preferences</title>
  1181.     <para>The following sections describe how to assign mandatory or default values
  1182. to look-and-feel preferences.</para>
  1183.     <sect2 id="gconf-19">
  1184.       <title>To Set Font Preferences</title>
  1185.       <indexterm>
  1186.         <primary>GConf</primary>
  1187.         <secondary>fonts, setting</secondary>
  1188.       </indexterm>
  1189.       <indexterm>
  1190.         <primary>fonts</primary>
  1191.         <secondary>setting with GConf</secondary>
  1192.       </indexterm>
  1193.       <para>To set font preferences, you modify the values of two preference
  1194. keys. The following table shows the keys to modify, and the part of the user
  1195. interface to which the keys correspond:</para>
  1196.       <informaltable frame="topbot">
  1197.         <tgroup cols="2" colsep="0" rowsep="0">
  1198.           <colspec colwidth="50*"/>
  1199.           <colspec colwidth="50*"/>
  1200.           <thead>
  1201.             <row rowsep="1">
  1202.               <entry>
  1203.                 <para>GConf Location</para>
  1204.               </entry>
  1205.               <entry>
  1206.                 <para>User
  1207. Interface Component</para>
  1208.               </entry>
  1209.             </row>
  1210.           </thead>
  1211.           <tbody>
  1212.             <row>
  1213.               <entry valign="top">
  1214.                 <para>/desktop/gnome/interface/font_name</para>
  1215.               </entry>
  1216.               <entry valign="top">
  1217.                 <para><application>Font</application> preference tool, <guilabel>Application font</guilabel> option</para>
  1218.               </entry>
  1219.             </row>
  1220.             <row>
  1221.               <entry valign="top">
  1222.                 <para>/apps/nautilus/preferences/desktop_font</para>
  1223.               </entry>
  1224.               <entry valign="top">
  1225.                 <para><application>Font</application> preference tool, <guilabel>Desktop font</guilabel> option</para>
  1226.               </entry>
  1227.             </row>
  1228.           </tbody>
  1229.         </tgroup>
  1230.       </informaltable>
  1231.       <para>For example, to set <literal>Sans 12</literal> as the mandatory application
  1232. font, run the following command:</para>
  1233.       <screen><userinput>gconftool-2 --direct \
  1234.   --config-source xml:readwrite:/etc/gconf/gconf.xml.mandatory \
  1235.   --type string \
  1236.   --set /desktop/gnome/interface/font_name "Sans 12"</userinput></screen>
  1237.       <para><indexterm><primary>desktop</primary><secondary>font preferences, setting
  1238. with GConf</secondary></indexterm>To set <literal>palatino 12</literal> as
  1239. the default desktop object font, run the following command:</para>
  1240.       <screen><userinput>gconftool-2 --direct \
  1241.   --config-source xml:readwrite:/etc/gconf/gconf.xml.defaults \
  1242.   --type string \
  1243.   --set /apps/nautilus/preferences/desktop_font "palatino 12"</userinput></screen>
  1244.     </sect2>
  1245.     <sect2 id="gconf-20">
  1246.       <title>To Set Background Preferences</title>
  1247.       <indexterm>
  1248.         <primary>GConf</primary>
  1249.         <secondary>background, setting</secondary>
  1250.       </indexterm>
  1251.       <indexterm>
  1252.         <primary>background</primary>
  1253.         <secondary>preferences,
  1254. setting with GConf</secondary>
  1255.       </indexterm>
  1256.       <para>To set preferences for the
  1257. desktop background, you modify the values of the preference keys in the <systemitem>/desktop/gnome/background</systemitem> location. For example, to set a mandatory
  1258. image for the background, run the following command:</para>
  1259.       <screen><userinput>gconftool-2 --direct \
  1260.   --config-source xml:readwrite:/etc/gconf/gconf.xml.mandatory \
  1261.   --type string \
  1262.   --set /desktop/gnome/background/picture_filename <replaceable>filename.png</replaceable></userinput></screen>
  1263.       <para>To set a default value for this preference, run the following command:</para>
  1264.       <screen><userinput>gconftool-2 --direct \
  1265.   --config-source xml:readwrite:/etc/gconf/gconf.xml.defaults \
  1266.   --type string \
  1267.   --set /desktop/gnome/background/picture_filename <replaceable>filename.png</replaceable></userinput></screen>
  1268.       <para>You can also set other background preferences. For information on the
  1269. other background preferences, see the <filename>desktop_gnome_background.schemas</filename> schema definition file.</para>
  1270.     </sect2>
  1271.     <sect2 id="gconf-21">
  1272.       <title>To Set Splash Image Preferences</title>
  1273.       <indexterm>
  1274.         <primary>GConf</primary>
  1275.         <secondary>splash image, setting</secondary>
  1276.       </indexterm>
  1277.       <indexterm>
  1278.         <primary>splash screen</primary>
  1279.         <secondary>image, setting
  1280. with GConf</secondary>
  1281.       </indexterm>
  1282.       <para>To set splash image preferences, you
  1283. modify the value of the preference keys in the <systemitem>/apps/gnome-session/options/</systemitem> location. For example, if you do not want users ever to see a
  1284. splash image, set a mandatory value as follows:</para>
  1285.       <screen><userinput>gconftool-2 --direct \
  1286.   --config-source xml:readwrite:/etc/gconf/gconf.xml.mandatory \
  1287.   --type bool \
  1288.   --set /apps/gnome-session/options/show_splash_screen false</userinput></screen>
  1289.       <para>To set a default value for this preference, run the following command:</para>
  1290.       <screen><userinput>gconftool-2 --direct \
  1291.   --config-source xml:readwrite:/etc/gconf/gconf.xml.defaults \
  1292.   --type bool \
  1293.   --set /apps/gnome-session/options/show_splash_screen false</userinput></screen>
  1294.       <para>You can also set other splash image preferences. For information on
  1295. the other splash image preferences, see the <filename>gnome-session.schemas</filename> schema definition file.</para>
  1296.     </sect2>
  1297.   </sect1>
  1298.   <sect1 id="gconf-28">
  1299.     <title>To Restore Default Preference Values</title>
  1300.     <indexterm>
  1301.       <primary>GConf</primary>
  1302.       <secondary>restoring default preference
  1303. values</secondary>
  1304.     </indexterm>
  1305.     <indexterm>
  1306.       <primary>preference values</primary>
  1307.       <secondary>restoring to default with GConf</secondary>
  1308.     </indexterm>
  1309.     <para>To
  1310. restore the default preference values for a user, run the following command:</para>
  1311.     <screen><userinput>gconftool-2 --direct \
  1312.   --config-source <replaceable>user-configuration-source</replaceable> \
  1313.   --recursive-unset</userinput></screen>
  1314.     <para>Replace <replaceable>user-configuration-source</replaceable> with the
  1315. configuration source in the <filename>.gconf</filename> directory in the home
  1316. directory of the user. </para>
  1317.     <para>This command resets the values of all preference keys, in all subdirectories,
  1318. from the user setting to the setting in the default configuration source.</para>
  1319.   </sect1>
  1320. </chapter>
  1321.