The scenario below assumes we booted up the computer and logged in as the user bort at the login menu. This is on 14.04.2.
If I open up a terminal, as the user bort I can list a dconf setting, for example
$ dconf read /org/compiz/profiles/unity/plugins/unityshell/launcher-hide-mode 0
If I were to use dconf write to change the value to 1 the menu on the left side of the screen would be hidden
$ dconf write /org/compiz/profiles/unity/plugins/unityshell/launcher-hide-mode 1 $ dconf read /org/compiz/profiles/unity/plugins/unityshell/launcher-hide-mode 1
Now the menu is hidden. Now lets assume I use dconf write to set it back to 0. The menu will appear again.
Now, if I was in one terminal as the user root and tried to use su bort -c to change the value for bort I CAN change it. I know this because in another terminal where I'm the user bort, I can use dconf read and see that the value has changed to 1. So the value has been changed BUT the menu on the left side of the screen is still visible. How can I make the change actually apply instead of just being updated in the dconf database? Ultimately I want to know this for use with Puppet's exec type but being able to do this as root from the terminal would be helpful towards that goal.
As root in a terminal:
# su bort -c "/bin/sh -c '/usr/bin/dconf write /org/compiz/profiles/unity/plugins/unityshell/launcher-hide-mode 1'"
As bort in a terminal after the previous command was run:
$ dconf read /org/compiz/profiles/unity/plugins/unityshell/launcher-hide-mode 1
Yet the menu is still there. I know this sort of question has some answers on this site, such as using dbus-launch but this hasn't worked for me. Maybe it's Ubuntu version specific?