[X-Unix] Displaying windows over the network

William H. Magill magill at mcgillsociety.org
Wed Feb 16 17:45:20 PST 2005


On 14 Feb, 2005, at 19:42, KL Tah wrote:
> I have a question about displaying windows on my machine in X11 when 
> I'm
> logged in to a remote machine with several layers of remote machines 
> beneath
> it.
>
> If I'm logged onto say remote_machine_1, using
> Ssh -X remote_machine1,
> I can open xterm fine on my mac.
>
> The problem is that once on remote_machine1, if I do another ssh -X
> remotemachine2 say, I can't open a window from that machine even after
> setting the display environment. Output looks something like that:
> Remote_machine2:mydir% xterm &  <--(seems fine here, but moments 
> later...)
> [2] 18152
> Remote_machine2:mydir% xterm Xt error: Can't open display: 
> xxx.xxx.x.x:0
>
> Where I have replaced my ip_address with x's.

Wow, the message delay from hotmail is significant!  (look at the 
headers, it arrived about an hour ago -- 2 days later.)

You don't indicate what OS is involved on each machine in your string, 
so here are a couple of possibilities.

First, BOTH the client and server implementations of SSH on EACH 
machine have to be configured for X11-Forwarding.

In the client:
      ForwardX11 yes

In sshd:
      X11Forwarding yes

I believe the defaults are "No" for all SSH implementations.

Second, don't forget:    xxx.xxx.x.x:0 is "definitely" wrong.

Most SSH implementations default to a displacement of 10 for the 
display.  xxx.xxx.x.x:10 would be the correct address.

Third, if the X11-Forwarding is turned on, you should only have to set 
your DISPLAY variable on your local machine to "ip-addr:0.0" and ssh 
will take care of the translation, incrementing it as needed. You 
should only ever set the DISPLAY variable on your local client machine.

One last point, older ssh implementations do not implement "-X", they 
only implemnt "-x" which DISABLES X11 forwarding. Which means that if 
SSHD is not configured by the SysAdmin for X11-Forwarding, you're out 
of luck.

[You can use ssh -v to see the connection dialog. You should find lines 
something along the lines of:
"Warning: No xauth data; using fake authentication data for X11 
forwarding."
"debug1: Requesting X11 forwarding with authentication spoofing."
depending on your setup.]

T.T.F.N.
William H. Magill
# Beige G3 [Rev A motherboard - 300 MHz 768 Meg] OS X 10.2.8
# Flat-panel iMac (2.1) [800MHz - Super Drive - 768 Meg] OS X 10.3.7
# PWS433a [Alpha 21164 Rev 7.2 (EV56)- 64 Meg] Tru64 5.1a
# XP1000  [Alpha 21264-3 (EV6) - 256 meg] FreeBSD 5.3
# XP1000  [Alpha 21264-A (EV 6.7) - 384 meg] FreeBSD 5.3
magill at mcgillsociety.org
magill at acm.org
magill at mac.com
whmagill at gmail.com



More information about the X-Unix mailing list