$DISPLAY is not properly set after upgrade to Opensuse 12.3

Hi,

I recently upgraded my laptop at work from Opensuse 11.4 to 12.3. Now $DISPLAY is not properly set. I.e.,

> echo $DISPLAY
:0

When I log in remotely using ssh, “echo $DISPLAY” just returns a blank line, whereas I had expected something like “localhost:10.0”. Thus I cannot run X applications remotely. This is puzzling, because it worked in Opensuse 11.4, and I don’t remember having fiddled with any settings. I have

ForwardX11 yes
ForwardAgent yes

in my ~/.ssh/config

In case there were some obsolete settings in my other configuration files, I tried creating a “fresh” test user, but that did not help.

Does anyone have an idea how to fix this?

Regards,

Did you try

$ ssh -X username@xyz.ddd.ojk

source:- ssh - Setting up a display environment variable for a remote unix system - Stack Overflow

Thanks, yes, I tried this, and it didn’t help. Isn’t this the same as setting

ForwardX11 yes

?

I suspect the problem is not directly related to ssh, since $DISPLAY is only “:0” in the begiinning?

Regards,

Intellipaat provides OpenStack online Training.
Hi,
We will start a new Open Stack batch from 20th april’13. Certification will be provided after successful completion of training. Interested candidates please drop an email for registration at sales@intellipaat.com or give us a call.
Regards,
Sales Intellipaat Team
Mob: 91-9019368913
Visit us at www.intellipaat.com.

I have done some more tests. I think the problem is somehow related to ssh.

When I log in using ssh, the following appears in /var/log/messages:

sshd[31251]: error: Failed to allocate internet-domain X11 display socket.

However, if I edit /etc/ssh/sshd_config and change
X11UseLocalhost yes
to
X11UseLocalhost no

and restart sshd, then $DISPLAY is set and I can start X applications.

Does anyone understand this? Is the latter setting less safe?

Regards,

I found the trick: To make it work using “X11UseLocalhost yes”, I needed to enable IPv6 in the network settings.

Strange and wonderful.