Re: Trying to synchronise GConf variables


I've synchronised a GConf key successfully! ;-)

First of all is needed enable the key
gconftool-2 -s --type bool /apps/online-prefs-sync/enabled true

To set this variable I've defined a file "myapp.schema" with the schema
for this key:
         <locale name="C">
            <short>Short description for this key</short>
            <long>Long description for this key</long>

And I've installed it with:
gconftool --install-schema-file=myapp.schema

I've set a value for this key with:
gconftool-2 -s --type string /apps/myapp/mykey VALUE

Later I've added the next line at the end of file
<key name="/desktop/gnome/myapp/myvar" scope="saved-per-user"

And recompile only this module:
jhbuild buildone online-desktop

And when I modify this key on an Online Desktop session in one computer
and later I start another Online Desktop session in another computer and
read the key, it's synchronised.
To read the variable you can use:
gconftool-2 -g /apps/myapp/mykey

Or if you prefer you can use "gnome-editor" to read and modify the key.

Best regards,

Manuel Rego Casasnovas
Computer Science Engineer
mailto:mrego igalia com
Tel: +34 986 10 76 10
Fax: +34 981 91 39 49
Igalia -

Attachment: signature.asc
Description: This is a digitally signed message part

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