This is the mail archive of the cygwin-xfree@cygwin.com mailing list for the Cygwin XFree86 project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: Running remote programs locally



On Wed, 27 Aug 2003, Andrew Clarke wrote:

> Start bash shell
> Run 'xwin &'
> When it comes up, I 'ssh linuxcomputer' and enter my password

You may need to include the -X parameter to ssh unless you've set it up as
a personal default.

> Through vncserver at my root prompt of my linux computer, I type 'xhost 
> +windowscomputer'.  I did the same with my windows computer's IP address 
> just to be sure.

I *believe* this only makes a difference to the machine the X server is
running on, in this case your Windows computer.

>  >From the xwin ssh window to my linux computer, I type something simple 
> like 'xterm -display windowscomputer:0' and I get the following error:
> 
> Xlib: Connection to "windowscomputer:0.0" refused by server
> Xlib: No protocol specified

The way ssh X forwarding works is by setting up a proxy X server on the X
client machine (your Linux box) that listens on localhost:n (where n is
greater than 0, starts at 10 usually I think). This accepts connections
from X clients e.g. xterms and tunnels them back through ssh to the real X
server at your desktop. The login process should set the DISPLAY variable
for you automatically. If it doesn't there's a sign something else is up.

e.g. I ssh from home (my Cygwin machine) to college (a Redhat machine).
When I type 

setenv|fgrep DISPLAY

into the shell at college, it tells me

DISPLAY=localhost:10.0

This is the ssh proxy X server's display. If I'd set it manually myself to
say my-home-pc:0.0 then an xterm (or whatever) on starting would attempt
to open a normal, unencrypted TCP/IP connection straight to me rather than
going through ssh.

For the record, I am writing this mail in an xterm on my college server,
which is displaying on my home PC via an ssh tunnel; which is in turn
forwarding its entire desktop as a Terminal Services session via ssh to my
work PC where I sit typing -- because I can ;-)

Andrew.




Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]