If this... sudo -u username dbus-launch gsettings set org.gnome.shell.extensions.dash-to-dock show-apps-at-top false ...shouldn't work, this... HOME_BAK=$HOME HOME="/home/username" sudo -u username gsettings set org.gnome.shell.extensions.dash-to-dock show-apps-at-top false HOME=$HOME_BAK ...should work.