1

I am attempting to set my desktop background from the command line in ubuntu 12.04.

I am able to do this from the terminal on the actual machine as described here.

gsettings set org.gnome.desktop.background picture-uri file:///path/to/my/image.png

However when I login to the machine over ssh and run the same command, I am presented with the following error:

ben@base:~$ gsettings set org.gnome.desktop.background picture-uri file:///path/to/my/image.png

** (process:19940): WARNING **: Command line `dbus-launch --autolaunch=ca5602075c1f96df6beebf670000000b --binary-syntax --close-stderr' exited with non-zero exit status 1: Autolaunch error: X11 initialization failed.\n

** (process:19940): WARNING **: Command line `dbus-launch --autolaunch=ca5602075c1f96df6beebf670000000b --binary-syntax --close-stderr' exited with non-zero exit status 1: Autolaunch error: X11 initialization failed.\n

How can I set the desktop over ssh?

2

The hint is X11 initialization failed. Graphics programs find the display screen through the '$DISPLAY' environment variable. Ssh does not propagate '$DISPLAY' by default, ssh -X gets you your own X session and sets '$DISPLAY'. but that is not the answer. Perhaps if you had done xhost +inet:remotesystem on the server first... See man xhost, and SEE ALSO X(7), Xsecurity(7), Xserver(1), xdm(1), xauth(1),

I think you are doomed to failure, unless you want to read a whole lot of man pages.

  • I know you can do this, I used to prank my coworkers. The answer has to be in Xsccurity – Nicholas Marshall Apr 26 '14 at 16:18
0

You need to tell gsettings what display you want to set the configuration on. Since you likely want to change the setting on the remote system, so for example the default display is:

export DISPLAY=":0"

Your Answer

By clicking "Post Your Answer", you acknowledge that you have read our updated terms of service, privacy policy and cookie policy, and that your continued use of the website is subject to these policies.

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