Summary II: X11 question, how to find out display#?

Ju-Lien Lim (julienlim@rocketmail.com)
Mon, 09 Feb 1998 13:09:02 -0800 (PST)

My thanks to everyone who wrote me with
recommendations on what to do:

David Thorburn-Gundlach <david@bae.uga.edu>
Jochen Bern <bern@TI.Uni-Trier.DE>
David Stern <dave@davka.gsfc.nasa.gov>
Mike Chang <machang@pfoo.com>
DJEVANS.AU.ORACLE.COM <DJEVANS@au.oracle.com>
Frank Cusack <fcusack@voicenet.com>
Kris Briscoe <brisco_k@adm-srv.sat.mot.com>

In case I didn't mention it before (which I probably
didn't), the display
does get set by ssh; however, if X11 forwarded is
disabled, then it won't
work. Disabling can be disabled from ssh
configurations but that's not
the case for me. Unfortunately, at this time, I
don't think I can even
rebuild ssh or even do anything to change this
machine to fix this problem
since it's a production machine <arg>. Anyway,
thanks again!

Ju
julienlim@rocketmail.com
http://ju-lien.home.ml.org/

=====================
*Original Question: *
=====================
I have a machine in CT and I run ssh (instead of
rlogin/telnet) to a machine (G16) in another state.
Anyways, once I get to G16, I'd like to be able to
open multiple xterms. However, I notice that I get
the following message when I log into the machine:

Warning: Remote host denied X11 forwarding, perhaps
xauth program could not be run on the server side.

Furthermore, when I type "xhost" on G16, I get the
following:
G16 => xhost
xhost: unable to open display ""

How do I enable X11 forwarding? Also, I really just
need to set the correct display, but don't how to
find out the display# that is part of setting the
DISPLAY
i.e. DISPLAY=hostname:display#.screen#) to set it to.
How do I find out the display#?

==========
*SUMMARY*:
==========
Jochen Bern writes:
You need to fix whatever Problem is keeping ssh from
doing its X11
Forwarding. You want to install ssh 1.2.22 anyway
(baaad Security
Bug in previous Versions re. ssh-agent-loaded Keys),
it comes with
a brand new Config File Command "XAuthLocation" ...
if that happens
to be the real Problem.

a) As long as you want to run your X11 Connection
through ssh (HIGHLY
recommended 'cause it encrypts, and optionally
compresses, Data
that goes through), ssh "creates" a Pseudodisplay
as you log in
and sets $DISPLAY appropriately - as soon as X11
Forwarding starts
to work, that is.
b) Otherwise (i.e., for a direct, unencrypted,
uncompressed X11 Network
Connection), you should set $DISPLAY on the remote
Login according
to the $DISPLAY you have in the local Login,
eventually adding
the whole Hostname Part or adding the Domain to it.

David Stern writes:
Wasn't sure if you've completely solved your problem
or not. If not,
I had the same problem using ssh between different
platforms and I
often got
Warning: Remote host denied X11 forwarding, perhaps
xauth program could not be run on the server side.

In my case, it was a matter of not being able to find
xauth on the
remote machine. One solution; soft-link xauth to a
common location. eg
if /usr/local/bin is in your path on both machines,
on the remote
machine
ln -s /usr/bin/X11/xauth /usr/local/bin/xauth or
whatever is
appropriate.
(>> It's in /usr/openwin/bin/xauth on both machines...)

Mike Chang writes:
I bet if you do an 'ssh -v g16' , you'll see
something like the server
is not allowing x11 forwarding. This can be be
disabled in the sshd
config files in /etc/sshd_config .. there is an
option to
allow/disallow X11 forwarding... by doing the '-v'
you'll be able to see
if it's this config or if it's some other error...
(>>> Yup... it's not in sshd_config... I already
checked.)

Unless you are using multiple displays, it'll be
hostname:0.0 ...
(>>> I am!)

_________________________________________________________
DO YOU YAHOO!?
Get your free @yahoo.com address at http://mail.yahoo.com