## Data conversion

GConf comes with a GSettings backend that can be used to facility the transition to the GSettings API until you are ready to make the jump to a different backend (most likely dconf). To use it, you need to set the `GSETTINGS_BACKEND` to 'gconf', e.g. by using

      g_setenv ("GSETTINGS_BACKEND", "gconf", TRUE);

early on in your program. Note that this backend is meant purely as a transition tool, and should not be used in production.

GConf also comes with a utility called gsettings-data-convert, which is designed to help with the task of migrating user settings from GConf into another GSettings backend. It can be run manually, but it is designed to be executed automatically, every time a user logs in. It keeps track of the data migrations that it has already done, and it is harmless to run it more than once.

To make use of this utility, you must install a keyfile in the directory `/usr/share/GConf/gsettings` which lists the GSettings keys and GConf paths to map to each other, for each schema that you want to migrate user data for.

Here is an example:

    [org.gnome.fonts]
    antialiasing = /desktop/gnome/font_rendering/antialiasing
    dpi = /desktop/gnome/font_rendering/dpi
    hinting = /desktop/gnome/font_rendering/hinting
    rgba-order = /desktop/gnome/font_rendering/rgba_order

    [apps.myapp:/path/to/myapps/]
    some-odd-key1 = /apps/myapp/some_ODD-key1

The last key demonstrates that it may be necessary to modify the key name to comply with stricter GSettings key name rules. Of course, that means your application must use the new key names when looking up settings in GSettings.

The last group in the example also shows how to handle the case of 'relocatable' schemas, which don't have a fixed path. You can specify the path to use in the group name, separated by a colon.

There are some limitations: gsettings-data-convert does not do any transformation of the values. And it does not handle complex GConf types other than lists of strings or integers.

Don't forget to require GConf 2.31.1 or newer in your configure script if you are making use of the GConf backend or the conversion utility.