![]() |
![]() |
![]() |
GIO Reference Manual | ![]() |
---|
GConf comes with a utility called gsettings-data-convert, which is designed to help with the task of migrating user settings from GConf into GSetting. gsettings-data-convert can be run manually, but it is designed to be run automatically, every time a user logs in. It keeps track of the conversion 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
/usr/share/gsettings-data-convert
which lists the GSettings
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] 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 make the corresponding adjustments.
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.