X client 'Can't open display' on OS11

I’m having a difficult time getting a remote x client to display on my machine. I have an xserver running locally, and connect via ssh.

I turned on X11 forwarding in remote host sshd_config:
X11Forwarding yes
X11DisplayOffset 10
X11UseLocalhost yes

I set the local ssh(OpenSSH) connection for X11 Forwarding.

An X server, Xming, is running locally.

X on the remote host is running without listening on port 6000:

ps -ef |grep X

root 1940 1924 0 Aug20 tty7 00:34:30 /usr/bin/X :0 -audit 0 -br -auth /var/lib/gdm/:0.Xauth -nolisten tcp vt7

netstat -an |grep 6000 returns nothing.

Running an X client doesn’t work:
oracle@oraman:~> xclock
Error: Can’t open display:

It’s my understanding that with tunneling I don’t have to turn on TCP listening for ssh on the host.

I checked the SDB and seem to have things set up correctly, but it’s not working.

What am I missing?

Sorry, no one has answered you. I would love to help you out, except I have the exact same problem, and I don’t know what to do either. Did you ever figure this out?

I use suse 11.3 on PIII, loaded with <init 3>, as gateway to/from internet. I access my data on this gateway with, for example, <gedit &> at home or outside with xming+putty. On suse 11.4/12.1 i cant’t use gedit in such way. I get error: “Cannot open display”. This issue is from suse 11.4/12.1 only, because there is no problems with 11.3.

On 11/21/2011 08:46 AM, makauskas wrote:
> I get error: “Cannot open display”.

is this as a normal user, or as root?

i assume you have not logged into the Gnome GUI as root and i guess
you are wanting to launch a graphical application (like gedit) in gnome
with root powers…to do that you need to be in the terminal as a
normal user, then issue this command:


gnomesu gedit

and, give the root password when asked for…

does that work for you?


DD http://tinyurl.com/DD-Caveat
dump Flash: http://www.bbc.co.uk/news/technology-15797399

Set DISPLAYMANAGER_REMOTE_ACCESS=“yes” is not enough

I enable “Remote root login in the display manager” and “Remote access to the X server” aditionaly.
Then log as normal user
<gnomesu gedit> through the same “Cannot open display” error in putty window.
And I’m not asked for any password !

With <su> in putty
<init 5>
<gedit>
I have the same error “Cannot open display”

But with suse 11.3 I can log as normal user into remote and run gedit in window on local WinXp. Suse 11.3 is loaded with run level = 3.
With suse 11.4/12.1 can’t do it remotely.

sorry, i can’t help any…hope someone else can…


DD

Ok. I’ve been using suse 11.4 on this box over a year after success reinstall.
I’ve install suse 12.3 on asus Eee ram-1gB now and have the same problem on clean install as previously suse 11.4 on PIII.

I can connect (xming+putty) from my win-Xp box to my old PIII with suse 11.4 without problems. But can’t to fresh suse 12.3 installed on new asus with same putty setings.

On latter 12.3 box:
1 echo $DISPLAY not set
2 xhost + : unable to open display …
3 .Xauthority not created (i’ve delete old 0 byte long .Xauthority file). Why?

I’ve try:
1 sshd_config from suse 11.4 on suse 12.3
2 disable ipv6 via YaST and check 127.0.0.1 localhost on top of /etc/hosts file
3 reinstall openssh on suse 12.3
4 ???

The same problems exist with root account too. But xauth list’s MIT-MAGIC-COOKIE-1 in /root/.Xauthority

Console run startx without problems.

Please start a new thread, the one you’re joining now is old, very old.

old, but no solution.

if you have two suse machines arouind the 12.3 release, as well as the usual:
xhost +
set DISPLAY on the ssh console

you have to get X to start on the remote machine without “-nolisten TCP”

ps ax | grep listen
will show it up

the nolisten was from the /etc/X11 configs
so grepping /etc/X11 and commenting out all the offending line.

ie as root
cd /etc/X11
grep -ir “listen” *

I also set everything in /etc/sysconfig/displaymanager that looked problematic to “yes”
then ran SuSEconfig for good measure
after that it still needed a reboot to work, restarting X (ctrl alt backspace twice) didn’t work.

ipv6 should be enabled

I am not sure what you are trying to do, but this is a thread from 2008 (!). So as well as the peoblem as the answer are likely to be for old versions and old infrastructure.

When you have a problem, please start a new thread in the best fitting forum with a good title.

This thread is CLOSED to avoid further confusion.