- infos =
- infos/author = Gabriel Rauter rauter.gabriel@gmail.com
- infos/status = experimental
- infos/provides =
- infos/description = Elektra GSettings Backend
Warning !!! This binding is unstable and could destroy your Elektra Configuration. Only use in testing environments.
A GSettings backend implementation based on Elektra.
See installation. This binding is currently not part of a released package.
To quickly test the experimental ElektraSettings on a test system see Quick Start below.
- passing gsettings unit tests
- all interface functionality but one
- reading user and (system) default values
- writing user values and trees of user values
- reset (delete) a key
- synchronization (no conflict handling yet)
- subscribing and unsubscribing for changes (needs Elektra’s dbus plugin mounted on subscribed path)
- get writability of key (As far as definable as writable from Elektra)
- synchronization conflict handling
- code cleanup
- proper error handling
- optimizations
- get permission (Elektra does not support this)
- Setting write path in Elektra
- See #762, #302, #775, #768
- default write path in elektra (currently this is /sw), this will probably going to be either a setting in kdb or an environment variable.
- elektra (for standalone build)
- gelektra (for standalone build)
- glib
- gio
- dbus
mkdir build && cd build
cmake -GSETTINGS_MODULE_PRIORITY=200 -DBINDINGS=gsettings ..
makecd GSETTINGS_SOURCE
mkdir build && cd build
cmake -GSETTINGS_MODULE_PRIORITY=200 ..
makeGSETTINGS_MODULE_PRIORITYset this value above the value of other GSettingsBackend modules so it gets selected as default- the dconf GSettingsBackend is known to have a value of
100
(sudo) make installIf you do a system installation consider doing a migration, so you can immediately keep using your settings.
For now you can export your existing dconf database trough:
dconf dump > dconf.iniand import it in elektra
cat dconf.ini | kdb import /sw iniexport current settings and delete them so they will not be hidden
kdb export /sw dump > tmp
kdb rm -r /swmount sw at you preferred location
(sudo) kdb mount sw /sw dbus $restofpluginsimport settings again
(sudo) cat tmp | kdb import /sw dump
rm tmpIf you want change notifications to work you have to mount /sw with the dbus plugin. Not mounting the dbus plugin is discouraged, because configuration changes will not propagate correctly.
If want to test Elektra's GSettings backend as default on your system, you can use the commands below to do so. These commands will compile Elektra with the GSettings backend. Note that this will replace the default backend (usually dconf). The ElektraSettings backend is currently experimental, so use it with caution and back up your date before doing this.
cmake -GNinja -DBINDINGS="ALL;glib;gsettings;-jna" -DBUILD_SHARED=ON -DBUILD_STATIC=ON -DBUILD_FULL=ON -DENABLE_COVERAGE=OFF -DENABLE_OPTIMIZATIONS=ON -DBUILD_STATIC=ON -DPLUGINS="ALL" -DTOOLS="ALL" -DINSTALL_SYSTEM_FILES=ON -DGSETTINGS_MODULE_PRIORITY=200 ..
ninja
(sudo) ninja install
(sudo) kdb gmount dbusG_MESSAGES_DEBUG=ElektraSettings will enable debug output of the backend. If you have
set the priority of the module below 100 and dconf installed you also have to
set GSETTINGS_BACKEND=elektra to be able to test elektra as default backend.
##Examples
export G_MESSAGES_DEBUG=ElektraSettings
export GSETTINGS_BACKEND=elektra
gsettings get org.gnome.gedit.preferences.editor auto-indent
gsettings set org.gnome.gedit.preferences.editor auto-indent false
gsettings get org.gnome.gedit.preferences.editor auto-indent
gsettings reset org.gnome.gedit.preferences.editor auto-indent
gsettings get org.gnome.gedit.preferences.editor auto-indent
gsettings list-recursively org.gnome.gedit.preferences.editor auto-indentG_MESSAGES_DEBUG=ElektraSettings GSETTINGS_BACKEND=elektra geditan application can still request a different backend then elektra with g_settings_new_with_backend ()