[techtalk] bad display name in "add" command

Almut Behrens almut_behrens at yahoo.com
Tue Jul 31 19:48:04 EST 2001


On Tue, Jul 31, 2001 at 09:47:00AM -0700, Jennifer L. Hamilton wrote:
> 
> The DISPLAY is set to :0.0. See below:
> 
> [cvsuser at attila test_module]$ cvs -q update -P -A
> jhamilto at cvstest.ops.n2h2.com's password: 
> /usr/bin/X11/xauth: (stdin):1:  bad display name "cvstest:10.0" in
> "add" command
> [cvsuser at attila test_module]$ echo $DISPLAY
> :0.0
> 
> I wonder what is the "add" command it is talking about. Perhaps I can
> run that from the command line and see what happens.

Hi,

when X forwarding is enabled for ssh (which it seems to be in your case)
the ssh daemon on the remote server sets up a kind of X proxy server
and tries to register it using xauth. The command looks something like:

/usr/bin/X11/xauth add cvstest:10.0 <protocol> <cookie>

(cookie and protocol are supplied by sshd)

If you feel like experimenting, and would like see the exact values, you
could create a little script ~/.ssh/rc, which logs the stuff to stdout
while leaving functionality intact:

# example /bin/sh script ~/.ssh/rc (will be run by sshd when logging in)

if read proto cookie; then
  # log to stdout
  echo $DISPLAY  $proto  $cookie
  # replicate regular functionality
  /usr/bin/X11/xauth -q add $DISPLAY $proto $cookie
fi

I guess that there's some problem with resolving the short hostname
"cvstest" on the remote server (does "nslookup cvstest" work?).
Could also be something else, though...

Anyway, the simplest thing to get rid of your problem would probably be
to *unset* DISPLAY before issuing the cvs update command. This will
indirectly disable X forwarding for the ssh connection, which in turn
will avoid that xauth gets called at all on the server side.

(Alternatively, you could try to find out how to have cvs pass the
option "-x" to the ssh that it uses to connect to the server. This would
also disable X forwarding. From the top of my head I don't know where
that is configured...)

In case you should need/want X forwarding enabled, just report back --
then we could try a few other things...

Cheers,

- Almut





More information about the Techtalk mailing list