Remote X

Matt Alexander plug-discuss@lists.PLUG.phoenix.az.us
Mon, 17 Sep 2001 12:04:54 -0700 (PDT)


Here's a problem that I've been having...
I have a computer with a private IP address behind a firewall (doing NAT). 
Whenever I try to run an X app through ssh, I get: "Error: Can't open display:"
Is it because NAT is getting in the way?  Any suggestions for getting this to
work?
Thanks,
~M


Quoting "der.hans" <PLUGd@LuftHans.com>:

> Am 17. Sep, 2001 schwätzte John (EBo) David so:
> 
> > hmmm... you also need to set the DISPLAY variable to something like
> > setenv DISPLAY laptop_name:0.0
> > 
> > and make sure that the laptop has set the "xhost +desktop_name" so
> that
> > the laptop will receive the stuff from the desktop...
> 
> NOOO!!!!
> 
> ssh takes care of the display stuff. What you describe actually sets
> your
> communication outside the secure tunnel opened by ssh as well as opens
> your
> display to outside programs.
> 
> bash-2.05$ hostname
> falco
> bash-2.05$ ssh -X archives
> Last login: Mon Sep 17 02:48:43 2001 from falco.lufthans.com on pts/2
> Linux archives 2.2.17 #1 Sun Jun 25 09:24:41 EST 2000 i586 unknown
> lufthans@archives:~$ echo $DISPLAY
> archives:11.0
> lufthans@archives:~$ 
> 
> That archives:11.0 actually points back to falco:0, which is where my
> original shell started.
> 
> BTW, for those that need to open an X display to local X traffic, but
> not external stuff use "xhost +local:". Also, if tcp is turned off in
> /etc/X11/xinit/xserverrc, then connections from the network aren't
> allowed.
> 
> Apps opened via ssh tunnels are actually local traffic, not network
> traffic
> because they make a connection to the X server via local methods (
> unix
> socket or tcp? I presume unix socket ), rather than connecting to the
> X
> server via the network.
> 
> ciao,
> 
> der.hans
> 
> -- 
> # der.hans@LuftHans.com home.pages.de/~lufthans/ www.DevelopOnline.com
> #  Only wimps use tape backup: _real_ men just upload their important
> #  stuff on ftp, and let the rest of the world mirror it. -- Linus
> Torvalds
> 
> ________________________________________________
> See http://PLUG.phoenix.az.us/navigator-mail.shtml if your mail doesn't
> post to the list quickly and you use Netscape to write mail.
> 
> PLUG-discuss mailing list  -  PLUG-discuss@lists.PLUG.phoenix.az.us
> http://lists.PLUG.phoenix.az.us/mailman/listinfo/plug-discuss
>