[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: Redirecting X from a remote host



On Wed, May 24, 2006 at 07:03:22PM +0100, Mark wrote:
> On Wed, May 24, 2006 at 11:31:36AM -0600, Ed wrote:
> > I need to redirect an X application on a Debian box to run on another
> > system running cygwin X.

I assume from this that you are running the application on the Debian
box, but want to display on an X server you have running on the
other system (is cygwin a Windows based X server?)

> > I managed to start X on the cygwin machine.
> > I telneted to the remote Debian box.
> > Now I want to invoke an application and have it displayed on my cygwin
> > X (client?)
> > 
> > On the debian box I know I need to do something like
> > xhost +192.168.2.50 (the cygwin machine)

No, this is the wrong way around. You would need to run 'xhost' on
the cygwin machine:
	xhost +<the debian machine>

> > set DISPLAY=192.168.2.50:0.0
> > 
> > I'm not quite getting it. Can someone set me straight?
In X the owner of the screen is the server, and the application
runs on the client. The server has to give the client permission
to connect to it (via xhost on Unix machines), then the client
sets the DISPLAY envar (or uses a command line option) to specify
which server it should try to connect to.
 
> A much better method is to use ssh with the -X option.  You need to make
> sure that the ssh on the debian box is set up to allow X forwarding
> (check the /etc/ conf files for ssh).  Then just do:
> 
> ssh -l your_user_name -X debian.box
> 
> You'll have to enter your password, then just start up the application
> as you would normally, and it'll display on the cygwin box.
> 
> There is a ssh option to compress, which could be useful if you have
> powerful boxes and a low-speed link between them.
> 
> You should avoid the xhost method unless you're 110% sure that you
> cannot be hacked.

A bit more overhead, but a lot more secure and circumvents a lot of
other potential problems, like the server not being configured to 
listen for TCP connections, or firewalls preventing incoming
connections to the server.

If your server is not running on a Unix host, the command will likely
be something other than 'ssh'.

Regards,
DigbyT
-- 
Digby R. S. Tarvin                                          digbyt(at)digbyt.com
http://www.digbyt.com



Reply to: