Gnome-tweaks, extract changes and change with dconf via script

Changing the decimal comma to a dot. I allready tried just in terminal, but not really suceed. Now back in Gnome:

I try to extract a change made in dconf database.

Starting gnome-tweaks -v with verbose, I get following output after change
(Keyboard&Mouse > Additional Layout Options > Numeric keypad Delete behavior > Four-level key with dot :

gnome-tweaks -v
Change: org.gnome.desktop.input-sources xkb-options -> ['kpdl:dot']
Change: org.gnome.desktop.input-sources xkb-options -> ['kpdl:dot']
/usr/lib/python3.11/site-packages/gi/overrides/ Warning: g_atomic_ref_count_dec: assertion 'old_value > 0' failed
  return, *args, **kwargs)

Now I do have the key and try to replicate with dconf
dconf dump /org/gnome/desktop/input-sources/

current=uint32 0
sources=[('xkb', 'br')]

Now my queston: How can I manipulate xkb-options=['kpdl:dotoss'] to write/remove it again (testing).

I checked the the man page and do miss an example. As it is a database I guess I have to write
xkb-options=0 that I can rewrite the value afterwards with my script?

Instead of a useful error i just get mostly displayed the help of dconf. Very irritating :blush:

Would be grateful for any hints how to do this manipulations with dconf.

1 Like
gsettings get org.gnome.desktop.input-sources xkb-options
gsettings set org.gnome.desktop.input-sources xkb-options "['kpdl:dot']"
gsettings reset org.gnome.desktop.input-sources xkb-options

gsettings(1) — Arch manual pages


Thanks a lot @vgaetera , it looks like I chosen the wrong tool to achieve a solution for my problem.

As time changes so do tools change. And also there are different levels of tools. I chosen dconf because I used the dconf-editor before. I still not see the whole picture of it. This is not really a problem, more a challenge.

You can achieve the same result with dconf, but it may require counter-intuitive syntax.
However, its main problem is that writing to the database ignores existing schema and does not validate arguments against allowed key path/name and value type/range.

1 Like

:bulb: the light gets brighter :wink:

One of the major changes in Red Hat Enterprise Linux 7 is the transition from GConf (for storing user preferences) to the combination of the GSettings high-level configuration system and the dconf back end.


As mentioned above, the GConf configuration system has been replaced by two systems:

  • the GSettings API, and

  • the dconf back end which serves as a low-level configuration system and program that collects system hardware and software configuration details in a single compact binary format.

Both the gsettings command-line tool and the dconf utility are used to view and change user settings. The gsettings utility does so directly in the terminal, while the dconf utility uses the dconf-editor GUI for editing a configuration database. See Chapter 9, Configuring Desktop with GSettings and dconf for more information on dconf-editor and the gsettings utility.