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?

bbrame
  • 113

2 Answers2

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.

waltinator
  • 36,399
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"