unofficial mirror of emacs-devel@gnu.org 
 help / color / mirror / code / Atom feed
From: Glenn Morris <rgm@gnu.org>
To: Stefan Monnier <monnier@iro.umontreal.ca>
Cc: emacs-devel@gnu.org
Subject: Re: CVS trunk emacsclient: X11 connection rejected
Date: Fri, 26 Oct 2007 20:44:18 -0400	[thread overview]
Message-ID: <4ky7dpbd3x.fsf@fencepost.gnu.org> (raw)
In-Reply-To: <jwvsl3ybgue.fsf-monnier+emacs@gnu.org> (Stefan Monnier's message of "Fri, 26 Oct 2007 01:24:23 -0400")

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	other threads:[~2007-10-27  0:44 UTC|newest]

Thread overview: 17+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2007-10-26  0:57 CVS trunk emacsclient: X11 connection rejected Glenn Morris
2007-10-26  5:24 ` Stefan Monnier
2007-10-27  0:44   ` Glenn Morris [this message]
2007-10-27  2:16     ` Stefan Monnier
2007-10-27  2:43       ` Glenn Morris
2007-10-27  3:04         ` Stefan Monnier
2007-10-27  3:33           ` Glenn Morris
2007-10-27 19:51             ` Stefan Monnier
2007-10-29 17:57               ` Glenn Morris
2007-10-29 18:02                 ` Glenn Morris
2007-10-29 19:16                 ` Stefan Monnier
2007-10-29 20:25                   ` Glenn Morris
2007-10-29 21:01               ` Stefan Monnier
2007-10-29 22:03                 ` Glenn Morris
2007-10-30  2:01                   ` Stefan Monnier
2007-10-26  5:41 ` Jan Djärv
2007-10-27  0:47   ` Glenn Morris

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

  List information: https://www.gnu.org/software/emacs/

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=4ky7dpbd3x.fsf@fencepost.gnu.org \
    --to=rgm@gnu.org \
    --cc=emacs-devel@gnu.org \
    --cc=monnier@iro.umontreal.ca \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this public inbox

	https://git.savannah.gnu.org/cgit/emacs.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).