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

From: Ju-Lien Lim (
Date: Mon Feb 09 1998 - 15:09:02 CST

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

   David Thorburn-Gundlach <>
   Jochen Bern <bern@TI.Uni-Trier.DE>
   David Stern <>
   Mike Chang <>
   Frank Cusack <>
   Kris Briscoe <>

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!


*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
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
i.e. DISPLAY=hostname:display#.screen#) to set it to.
 How do I find out the display#?

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
ln -s /usr/bin/X11/xauth /usr/local/bin/xauth or
whatever is
(>> 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

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

Get your free address at

This archive was generated by hypermail 2.1.2 : Fri Sep 28 2001 - 23:12:30 CDT