In article <
bc9c0562-0e81-4b7d-a79a-128fef7cc81f@googlegroups.com>
sgerardengle@gmail.com writes:
I have students that are using PuTTY for X-forwarding from a remote
Linux cluster. They specify the X display location as localhost:0.0, but >whenever they try ti display a new window or graphic, they keep getting
an error that localhost:20.0 or localhost:17.0 can't be connected to.
Those different values are to be expected - the SSH server listens on
a TCP port that must be different from the ones used by any X servers
running on that host, and different from the ones used by other X
forwardings. The OpenSSH server has a config parameter for it:
X11DisplayOffset
Specifies the first display number available for sshd(8)'s X11
forwarding. This prevents sshd from interfering with real X11
servers. The default is 10.
So, the first SSH connection with X forwarding will make the SSH
server set the environment $DISPLAY to localhost:10.0, which
corresponds to TCP port 6010 on the server host, the next one
localhost:11.0 / port 6011 and so on. X clients started on the server
host will connect to the SSH server according to $DISPLAY, the
connection is forwarded to the SSH client, which connects to the
actual X server, typically based on the $DISPLAY setting on the client
host.
And I think *this* is where your problem is - I'm not familiar with
PuTTY, but I assume that's where you specify "localhost:0.0". IMHO,
this shouldn't be needed, PuTTY should at least by default use the
$DISPLAY setting - and localhost:0.0, which means "connect to TCP port
6000", probably doesn't work, since the X server doesn't listen for
TCP connections by default.
In fact I can reproduce your problem with the OpenSSH client, which
*only* uses $DISPLAY. With my default setting of $DISPLAY, i.e.
":0.0", which means "connect via unix domain socket", X forwarding
works just fine, but
client $ export DISPLAY=localhost:0.0
client $ ssh -X server
...
server $ xterm
connect localhost port 6000: Connection refused
xterm: Xt error: Can't open display: localhost:12.0
server $
(The first line is from the OpenSSH client, failing to connect to "localhost:0.0", while the second one is from xterm on the server.)
Is there some other setting that I'm missing
Try not specifying an X display for PuTTY at all, maybe it will then
use $DISPLAY - or, check your $DISPLAY value (probably ":0.0"), and
specify that for PuTTY.
--Per Hedeland
--- SoupGate-Win32 v1.05
* Origin: fsxNet Usenet Gateway (21:1/5)