Bruce Gui wrote:

yes, the "local" system is Windows, and I use PuTTY to connect to remote
Linux via SSH. "X forwarding" is enabled.


X forwarding may be disabled on the host to which you are connecting...

but when I enter "xterm &", the remote host display:

Xlib: connection to "mylocalIPaddr:0.0" refused by server
Xlib: No protocol specified
xterm Xt error: Can't open display: mylocalIPaddr:0.0"xterm &".

if i modify $DISPLAY to "localhost:0.0", then "xterm Xt error: Can't open
display: localhost:0.0" appears when i issue xterm&


If X11Forwarding is working correctly through SSH, you should need to
make no changes at all to DISPLAY.  This is part of what SSH does for
you.  You can verify this by:

> echo $DISPLAY
localhost:10.0

The number may be greater than 10, but is definitely not 0...

I remember there should be a listening port 6010 on the remote host, and
DISPLAY=localhost:0.0, that's to say: the local cygwin is a X11-server,
the remote host is a X11-client, remote host connect its port 6010 to
local host's port 6000, so
the display on the remote host will be redirected to local host.


If there is not a listening port on the remote host that corresponds
with your SSH session, then the server is not setting up its end of the
X forwarding connection: either it is rejecting your SSH client's
request because of configuration (sshd_config does not say
"X11Forwarding yes", since the default is "no") or some other problem
exists at the server.

X display ports start at TCP port 6000.  By default SSH starts
allocating display numbers for forwarding starting at 10, which is why
you see port 6010 tunelled through to your SSH client if your DISPLAY
variable says :10.0.  Because you may not be the first person to tunnel
X via SSH on that host, you must always let SSH handle it for you (if
you are the second, for example, you will get display number 11 and TCP
6011 will be tunnelled to you).

If a TCP X display port is open against your sshd process but your
DISPLAY variable doesn't correspond, check your shell profile scripts
(/etc/profile, ~/.bash_profile, etc) for a command that sets DISPLAY.

Cheers,
Vic Cross

----------------------------------------------------------------------
For LINUX-390 subscribe / signoff / archive access instructions,
send email to [EMAIL PROTECTED] with the message: INFO LINUX-390 or visit
http://www.marist.edu/htbin/wlvindex?LINUX-390

Reply via email to