How to use preferences synchronization

This page try to explain how you can use Online Desktop preferences synchronization to store and synchronized your own GConf key.

First of all, if you want that Online Desktop synchronize your GConf it's needed enable the key /apps/online-prefs-sync/enabled:

gconftool-2 -s --type bool /apps/online-prefs-sync/enabled true

To set this variable you have to define a file myapp.schema with the schema for this key:

<gconfschemafile>
   <schemalist>
      <schema>
         <key>/schemas/apps/myapp/mykey</key>
         <applyto>/apps/myapp/mykey</applyto>
         <owner>myapp</owner>
         <type>string</type>
         <default>default_value</default>
         <locale name="C">
            <short>Short description for this key</short>
            <long>Longer description for this key...</long>
         </locale>
      </schema>
   </schemalist>
</gconfschemafile>

And install this schema with:

gconftool --install-schema-file=myapp.schema

Then you can set a value for this key with:

gconftool-2 -s --type string /apps/myapp/mykey VALUE

Later you have to add the next line at the end of file ~/od/checkout/online-desktop/online-prefs-sync/online-prefs-sync.synclist (or another file *.synclist):

<key name="/desktop/gnome/myapp/myvar" scope="saved-per-user"
priority="lowest"/>

And recompile module modified:

jhbuild buildone -a online-desktop

And when you modify this key on an Online Desktop session in one computer and later you 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 gconf-editor to read and modify the key.

Attic/OnlineDesktop/PrefsSync/HowToUse (last edited 2013-11-22 20:34:49 by WilliamJonMcCann)