Subject: Re: can't open display despite xhost+
To: Malcolm Herbert <mjch@mjch.net>
From: Paul (NCC/CS). <pts@bom.gov.au>
List: port-i386
Date: 09/13/2004 16:40:36
Many thanks,

but I found it, or remembered it eventually.

had to remove :
-nolisten tcp

from Xservers file.

doh.

cheers,
Paul.





Malcolm Herbert wrote:

> On Mon, Sep 13, 2004 at 04:15:08PM +1000, Paul (NCC/CS). wrote:
> |apologies for having to ask this for the nth time in the
> |last 5 years, but each time I set up a new box I've forgotten!:(
> |
> |In X windows:
> |I have run the command xhost+    but still other hosts give:
> |Error: Can't open display:
> |When I try to run an X app from the remote host.
> |
> |I think in the past I have turned off some authentication
> |as I am on a private / secure network.
>
> how do you get to the remote host in order to get a shell on it?
>
> if you use ssh you can do
>
>   ssh -oForwardX11=yes remote.host.dom.ain
>
> which will make an X tunnel back along your ssh connection to your
> local host, with the 'display' at the remote end being something like
> localhost:10.0 or similar[1].
>
> plus is that this works on secure or insecure networks and is
> probably a good habit to get into - you don't need to change your
> authentication model if you don't want to, either
>
> you can also chain this too - for instance I have a Windows machine as
> my workstation (don't ask), but I have an SSH client which knows how to
> tunnel X back to my workstation, where I run a Windows X server which
> only allows connections from the local machine - my end of the SSH tunnel
> is considered to be the local machine, even if the traffic originates
> elsewhere.
>
> I ssh in to a remote host and can then put X windows on my local Windows
> machine. What's more, if I use a command similar to the above, I can
> also get applications which are more than one ssh connection away to
> display on my local machine ...
>
> Hope that helps,
> Malcolm
>
> [1] yes, there is a -x or -X option to do this, however for some
> reason the default behaviour of this option changed for OpenSSH at
> some point (it used to be -x to forward X11, now -X ... or vise
> versa, can't recall), so the long option is less ambiguous.
>
> --
> Malcolm Herbert                                    System Administrator
> ph [990] 54881 rm 28-241                          School of GeoSciences

--

____________________________________________

Paul
Australian Bureau Of Meteorology
____________________________________________