problems with schema file



I am having problems getting default values from the schema file in
gconf. I can happily read and write data to gconf, which gets written to
~/.gconf, but I can't get it to return the default when there is no
value set.

I create a simple schema file nomad.schema

<gconfschemafile>
    <schemalist>
      <schema>
        <key>/schemas/apps/nomad/support/telnet</key>
        <applyto>/apps/nomad/support/telnet</applyto>
        <owner>nomad</owner>
        <type>string</type>
        <default>telnet stuff here</default>
        <locale name="C">
        <short>Telnet command</short>
        <long>Telnet command called by helper application</long>
        </locale>
      </schema>
  </schemalist>
</gconfschemafile>

Move the schema file into /etc/gconf/schemas
cp nomad.schema /etc/gconf/schemas/nomad.schema

Now install the schema,
gconftool --get-default-source
returns the default location xml::/etc/gconf/gconf.xml.defaults
export GCONF_CONFIG_SOURCE=xml::/etc/gconf/gconf.xml.defaults
gconftool --shutdown
gconftool --makefile-install-rule /etc/gconf/schemas/nomad.schemas
This creates files in /etc/gconf/gconf.xml.defaults

Now schema is installed we should be able to ask for values and have the
defaults returned
gconftool --get /apps/nomad/support/telnet
except I get
No value set for `/apps/nomad/support/telnet'
instead of the default. What am I doing wrong?

I'm running Redhat 7.2 with Ximian Gnome.

Thanks,

Paul






[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]