emacs-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: CVS trunk emacsclient: X11 connection rejected


From: Glenn Morris
Subject: Re: CVS trunk emacsclient: X11 connection rejected
Date: Fri, 26 Oct 2007 20:44:18 -0400
User-agent: Gnus (www.gnus.org), GNU Emacs (www.gnu.org/software/emacs/)

Stefan Monnier wrote:

>>   X11 connection rejected because of wrong authentication.
>>   *ERROR*: Connection lost to X server `localhost:10.0'
>
> It's strange you get such an error: it seems to indicate that SSH
> did do X11 forwarding, proiperly set the $DISPLAY envvar, but
> somehow the corresponding Xauth key didn't get to ~/.Xauthority
> file, or else your Emacs server somehow fails to find this key
> (maybe it doesn't re-read the .Xauthority file?). Could you
> investigate a bit more?

Should I be trying to debug ssh or Emacs, or both? `ssh -vvv' doesn't
tell me much. Some snippets:

debug1: Authentication succeeded (hostbased).
debug1: channel 0: new [client-session]
debug3: ssh_session2_open: channel_new: 0
debug2: channel 0: send open
debug1: Entering interactive session.
debug2: callback start
debug2: x11_get_proto: /usr/bin/xauth  list unix:10.0 2>/dev/null
debug1: Requesting X11 forwarding with authentication spoofing.
debug2: channel 0: request x11-req confirm 0
[...]
debug1: Sending command:
/scratch/gmorris/emacs/cvs/trunk/lib-src/emacsclient --no-wait
/scratch/gmorris/emacs/cvs/trunk/README
debug2: channel 0: request exec confirm 0
debug2: fd 3 setting TCP_NODELAY
debug2: callback done
debug2: channel 0: open confirm rwindow 0 rmax 32768
debug2: channel 0: rcvd adjust 131072
debug1: client_input_channel_open: ctype x11 rchan 2 win 65536 max 16384
debug1: client_request_x11: request from 127.0.0.1 36444
debug2: fd 7 setting TCP_NODELAY
debug2: fd 7 setting O_NONBLOCK
debug3: fd 7 is O_NONBLOCK
debug1: channel 1: new [x11]
debug1: confirm x11
debug2: X11 connection uses different authentication protocol.
X11 connection rejected because of wrong authentication.
debug2: X11 rejected 1 i0/o0


If I do something like:
  host2> ssh -vvv host1 xterm

then the debug output looks basically the same up to the successful
creation of an xterm at "confirm x11".


> It's a change introduced by the multi-tty code.  You can override it in
> various ways, such as:
>
>    ssh host1 emacsclient --display :0 --no-wait $PWD/README

If I use this method, my original Emacs instance pops up a new frame
(this is emacs -Q, so it should not do this AFAIK), but doesn't visit
the specified file (at all).

>    ssh host1 DISPLAY= emacsclient --no-wait $PWD/README

This works. The specified file is visited in the existing frame of the
original Emacs.




reply via email to

[Prev in Thread] Current Thread [Next in Thread]