3

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 of gsettings list-recursively)
  • convert gsettings list into the dconf 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

1 Answers1

2

For the time being, i found a simple solutoin:

I found that the dump received from dconf is changing only little when updated. Therefore, it is sufficient to start with loading initially a dump and then update the configuration gradually and produce a new dump. The initial and the final dump can be compared with meld; merging is possible.

I use this with ansible, having a currentTargetDump copied to other machines and loaded. This makes all ansible host computers having the same configuration.

Before I load the new configuration I take a dump of the current configuration. I can compare the current configuration with the target configuration with Meld and merge changes into the target configuration and write it back to serve as the future target configuration which is distributed to all hosts.

Seems simple and work well so far.