The Cookie Machine - Click here to drag window

DUMMY TEXT - Real text set in assets/js/theCookieMachine.js

Views: 384โ€…    Votes:  2โ€…
Tags: command-line   database   dconf   gsettings  
Link: ๐Ÿ” See Original Question on Ask Ubuntu ๐Ÿ”—

URL: https://askubuntu.com/q/1090244
Title: dconf database how to remove duplicate & triplicates?
ID: /2018/11/05/dconf-database-how-to-remove-duplicate-_-triplicates_
Created: November 5, 2018    Edited:  June 12, 2020
Upload: November 24, 2022    Layout:  post
TOC: false    Navigation:  false    Copy to clipboard:  false


My gsettings database has many entries that are duplicated or triplicated. Some are โ€œnormalโ€ single entries.

$ gsettings --schemadir /usr/share/glib-2.0/schemas list-recursively | grep button-power
org.gnome.settings-daemon.plugins.power button-power 'interactive'
org.gnome.settings-daemon.plugins.power button-power 'interactive'

$ gsettings list-recursively | grep sudoku-difficulty
org.gnome.sudoku print-multiple-sudoku-difficulty 'easy'

$ gsettings list-recursively | grep print-wrap-mode
org.gnome.gedit.preferences.print print-wrap-mode 'word'
org.gnome.gedit.preferences.print print-wrap-mode 'word'
org.gnome.gedit.preferences.print print-wrap-mode 'word'
## ```



## `dconf dump` and `dconf load` are not effective

The utility `dconf dump` doesn't show duplicate entries:

$ dconf dump /org/gnome/settings-daemon/plugins/power/ [/] idle-dim=false lid-close-battery-action=โ€™nothingโ€™ critical-battery-action=โ€™shutdownโ€™ lid-close-ac-action=โ€™nothingโ€™


Running `dconf dump` of single entries to file and import same file using `dconf load` doesn't get rid of duplicate entries:

$ gsettings list-recursively | grep lid-close-battery org.gnome.settings-daemon.plugins.power lid-close-battery-action โ€˜nothingโ€™ org.gnome.settings-daemon.plugins.power lid-close-battery-action โ€˜nothingโ€™

$ dconf dump /org/gnome/settings-daemon/plugins/power/ > dconf-lid-battery.txt

$ dconf load /org/gnome/settings-daemon/plugins/power/ < dconf-lid-battery.txt

$ gsettings list-recursively | grep lid-close-battery org.gnome.settings-daemon.plugins.power lid-close-battery-action โ€˜nothingโ€™ org.gnome.settings-daemon.plugins.power lid-close-battery-action โ€˜nothingโ€™

```

Might be a bug?

Appears to be a bug:

Based on bug reports it could be these three areas:

$ gsettings get org.freedesktop.ibus.general dconf-preserve-name-prefixes
['/desktop/ibus/engine/pinyin', '/desktop/ibus/engine/bopomofo', '/desktop/ibus/engine/hangul']

Replies to comments

Here are file and directory names of /etc/dconf:

$ tree /etc/dconf/
/etc/dconf/
โ”œโ”€โ”€ db
โ”‚ย ย  โ”œโ”€โ”€ ibus
โ”‚ย ย  โ””โ”€โ”€ ibus.d
โ”‚ย ย      โ””โ”€โ”€ 00-upstream-settings
โ””โ”€โ”€ profile
    โ””โ”€โ”€ ibus

3 directories, 3 files

Two of three files are dated from 2016 (Ubuntu 16.04 development time):

-rw-r--r-- 1 root root 3163 Oct  1 16:51 /etc/dconf/db/ibus
-rw-r--r-- 1 root root 1978 Jan 19  2016 00-upstream-settings
-rw-r--r-- 1 root root   28 Jan 19  2016 /etc/dconf/profile/ibus
โ‡ง Is Vim safe to use in combination with sudo? How to use a key press to wake a suspended laptop when using a KVM switch?  โ‡ฉ