Ask Ubuntu is a question and answer site for Ubuntu users and developers. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I am trying to change some gconf settings in Ubuntu 12.10. I would like to change the lightdm greeter background.

I have discovered that while logged in to unity as a user while running X server, I am able to do this with:

sudo xhost +SI:localuser:lightdm
gsettings set com.canonical.unity-greeter background "'/usr/share/backgrounds/micros-background.png'"

The problem is that this requires me to login as a user under X. So that entire window manager needs to be running. But I want to use chroot to change these settings without any X server running. I just want to mount the partitions and change gsettings without having the full window manager running.

Is there a way to directly change gsettings without being logged into X and Unity?

Or alternatively... is there a way to bring up the X server and Unity in the background so that I can make the changes without having a full windowed display come up on my monitor?

share|improve this question

migrated from Mar 31 '13 at 15:54

This question came from our site for professional and enthusiast programmers.

It's possible to run gsettings without X11 using dbus-launch --exit-with-session:

dbus-launch --exit-with-session gsettings set com.canonical.unity-greeter background "'/usr/share/backgrounds/micros-background.png'"
share|improve this answer
Thank you for this! I used this to set settings for another user not logged in like this sudo -u "username" dbus-launch --exit-with-session gsettings set org.gnome.settings-daemon.plugins.power lid-close-ac-action 'nothing' – HarlemSquirrel Mar 3 '15 at 19:20

Some people says that you must precede the "gsettings" command by the "dbus-launch" word, but I haven't tried it.

share|improve this answer

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.