2

I used Unity Tweak Tool to make some changes and I wanted to find out what keys it used for the changes so I dumped the db to a file like this:

dconf dump / > altered_settings.ini

Then I reset everything back to the defaults and dumped the unmodified DB:

dconf dump / > default_settings.ini

and used diff to compare the two files like this:

diff -y --suppress-common-lines default_settings.ini altered_settings.ini

heres the results: Difference between two dconf files

I don't understnad the output. In some cases the columns line up properly so I can easily see what key was changed, in some cases they are misaligned by one row, and in some cases they don't line up at all. Heres a snippet:

panel-opacity=1.0                         | background-color='#333333ff'
icon-size=48                              | icon-size=34
backlight-mode=1                          | launcher-hide-mode=0
launcher-opacity=0.66669999999999996      | backlight-mode=3
                                          > launcher-opacity=1.0

In that example icon-size is aligned with the icon-size line from file two. But launcher opacity is aligned with backlight-mode, and the last line > launcher-opacity=1.0 is saying that launcher-opacity doesn't exist in file 1. So these results are unreliable. Is this a problem with diff itself, or could it be that there are some lines missing in each file so the columns get misaligned? Is there a better way to do this, to find out which keys have been changed? Also, with diff could I display the whole file in columns, and colour the columns that match one colour, and the columns that don't match another colour?

  • I'm assuming this isn't something you'll be doing often so regarding "... in some cases they are misaligned by one row, and in some cases they don't line up at all." just use your text editor to fix the misalignment or to enter a new row in one of the columns. – DK Bose Apr 14 '17 at 1:36
  • sdiff yielded the same results, but thanks for informing me about that command. Displaying it in columns is so much cleaner and easier to read. – John Slotsky Apr 16 '17 at 7:32

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.