I have several computers running MATE desktop and I want to merge their setup (and keep them in sync afterwards). With dconf dump /
I can get configuration details, but comparing the output (with meld
) is hopeless as the order in which entries are presented is not the same, thus a manual, intelligent merge is not feasible.
Alternatively, I can use gsettings list-recursively
which gives a list which can be sorted and then compared, but I do not see how to write back the result (there is no command like dconf load
for this file format).
I see possible approaches:
- sort the output of
dconf dump
(there should be some utilities, but I could not find any) - a
gsettings write-many
function, as an inverse ofgsettings list-recursively
) - convert
gsettings
list into thedconf dump
format - sort the
dconf dump
list.
What is easiest with existing tools? considering the discussion and here my goal of keeping configurations in sync may not be very easy.
As examples, I include short pieces of the two list formats I currently have:
gsetting
produces (extract):
org.gnome.rhythmbox.podcast-source paned-position 180
org.gnome.rhythmbox.podcast-source sorting ('Feed', true)
org.blueman.transfer opp-accept false
org.blueman.transfer shared-path ''
org.mate.Caja.Sendto last-compress 0
org.mate.Caja.Sendto last-medium ''
org.gnome.evolution-data-server.calendar contacts-reminder-interval 15
and dconf dump
(different extract):
[apps/light-locker]
idle-hint=false
late-locking=false
lock-after-screensaver=uint32 0
lock-on-lid=false
lock-on-suspend=false
[ca/desrt/dconf-editor]
saved-view='/org/mate/caja/'
window-height=600
window-is-maximized=false
window-width=800
gsetting
anddconf dump
fragments described the same part of the configuration. Thegsetting
output is easier to work with - each line is complete. But, in either case, filter the transferred config - only transfer SOME (manually specified) config items. Maybe it's time to learn Perl? – waltinator Nov 21 '20 at 17:18gsettings list-recursively | sort -u
would be good starting point. – N0rbert Nov 21 '20 at 17:21