[TriLUG] remote X display

Ben Pitzer uncleben at mindspring.com
Wed Mar 5 21:14:56 EST 2003


Ryan,

Okay, first off, keep a few things in mind.

1.  X sessions over SSH are slow, which is why they are typically used only
for individual applications, not entire desktops.
2.  The third host threw me.  Typically, when I do this, on my localhost
(mybox.domain) I'll type 'xhost +remotebox.domain'.  Then, I'll ssh into
that box, and run 'export DISPLAY=mybox.domain:0.0'.  It would be 0.1 if you
want it on a different virtual terminal on mybox.  Or 1.0.....can't
remember.  Then start your app, typically backgrounded, but it doesn't have
to be.  Try this with just an xterm sometime and see what happens.
3.  You say you cannot use VNC.  Why not?  It's very light, can be tunneled
through SSH (again, however, expect it to be slow), and will do pretty much
exactly what you're looking for.  LTSP is another option, although I'm not
certain of the security aspects.

You might also need to verify that your ssh config allows the passing of X
packets.  Some ssh configs have this turned off by default, but most have it
turned on.  The place to look is the ssh_config file, typically in
/etc/ssh/, but it could be elsewhere depending on your distro.  Make sure
that ForwardX11 is not set to no, or if in doubt, you can explicitly set it
to yes.  That's about all I know, but like I said, X sessions over SSH are
really only practical if you're doing single apps rather than entire desktop
environments.  If you MUST do an entire desktop, try something smaller as a
desktop (as in no Gnome or KDE).  IceWM is fairly lightweight, or even FVWM
if you can stand it.  Otherwise you'll be wasting bandwidth, and would have
better results installing a new box on a $30 P75 that I'd be happy to sell
you.

Regards,
Ben Pitzer

---------------------------------------------------------------
Systems Administrator                   Tel:  919-287-5013
Durham RDC                              Cell: 919-368-2824
Road Runner                             Email: bpitzer at southeast.rr.com
                                        AIM: bpitzerRR





> -----Original Message-----
> From: trilug-admin at trilug.org [mailto:trilug-admin at trilug.org]On Behalf
> Of Ryan Leathers
> Sent: Wednesday, March 05, 2003 1:16 PM
> To: 'trilug at trilug.org'
> Subject: [TriLUG] remote X display
>
>
> I want to get an X client (on host A) to direct its display to an X
> server (on host B)
>
>
> The connection between hosts must be ssh.  I need the full desktop - not
> individual X apps.  I can not use VNC instead, etc.
>
> I have configured host A (xauth, xsessions, gdm stuff...) and am able to
> use XDMCP and CHOOSER to connect from a solaris host (host C)
> I am also able to ssh from host B to host A.  From the remote shell on
> host A I can echo $DISPLAY and I see that it is set to localhost:11.0
>
> I understand this to mean that an X client started on host A, directed
> to localhost:11.0, will be treated as another local X display on host A,
> but in fact the X will be redirected through the ssh tunnel back to host
> B.
>
> How do I now get host A's X desktop displayed back on host B?
> If I do X -query localhost (which is where DISPLAY is exported for the
> ssh tunnel) I get an error saying unknown host: localhost
> If I do X -query 172.16.128.140 (which is the ip address of host B) I
> get an error saying Server is already active for display 0
>
>
> Thanks to those who have helped so far... I asked questions of several
> folks at the install-fest but still have not figured this out.
>
>
>
>
>
>
>
>
>
>




More information about the TriLUG mailing list