Ubuntu – How to change dconf keys without a gui (for a post-install script)

dconf

I have installed dconf-tools. In this case I am manipulating the display of a name in the panel on the session indicator.

I can change this in dconf-editor gui with no problem, I go to apps/indicator-session, and untick show-real-name-on-panel.

However, I have also tried to toggle it just using dconf at the command line:

dconf write /com/canonical/indicator/session/show-real-name-on-panel false

After rebooting, the panel is unchanged, and the key in the dconf-editor is unchanged as well.

Moreover, trying to update the dconf database via the terminal yields an error:

$ dconf update
fatal: Error opening directory '/etc/dconf/db': No such file or directory

From my experience it seems as though dconf and dconf-editor have no relationship, so I just wonder what I am doing wrong.

If I can get this figured out, I want to just place the command in a bash script to run the next time I have to do a clean install for an upgrade*. I do a lot of tweaks in 6 months and I just want to automate as much as possible from now on.

  • Slightly off-topic: the distribution upgrade mechanism has never worked without a hitch for me; I tried it going from 11.04 to 11.10 as well.

Best Answer

You can use the gsettings tool.

gsettings set com.canonical.indicator.session show-real-name-on-panel false