From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Glenn Morris Newsgroups: gmane.emacs.devel Subject: Re: CVS trunk emacsclient: X11 connection rejected Date: Fri, 26 Oct 2007 20:44:18 -0400 Message-ID: <4ky7dpbd3x.fsf@fencepost.gnu.org> References: NNTP-Posting-Host: lo.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Trace: ger.gmane.org 1193445872 14961 80.91.229.12 (27 Oct 2007 00:44:32 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Sat, 27 Oct 2007 00:44:32 +0000 (UTC) Cc: emacs-devel@gnu.org To: Stefan Monnier Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Sat Oct 27 02:44:33 2007 Return-path: Envelope-to: ged-emacs-devel@m.gmane.org Original-Received: from lists.gnu.org ([199.232.76.165]) by lo.gmane.org with esmtp (Exim 4.50) id 1IlZmz-0006Mf-L1 for ged-emacs-devel@m.gmane.org; Sat, 27 Oct 2007 02:44:33 +0200 Original-Received: from localhost ([127.0.0.1] helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1IlZmr-00029v-1g for ged-emacs-devel@m.gmane.org; Fri, 26 Oct 2007 20:44:25 -0400 Original-Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1IlZmm-000295-DA for emacs-devel@gnu.org; Fri, 26 Oct 2007 20:44:20 -0400 Original-Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1IlZml-00028j-Ma for emacs-devel@gnu.org; Fri, 26 Oct 2007 20:44:20 -0400 Original-Received: from [199.232.76.173] (helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1IlZml-00028e-Gg for emacs-devel@gnu.org; Fri, 26 Oct 2007 20:44:19 -0400 Original-Received: from fencepost.gnu.org ([140.186.70.10]) by monty-python.gnu.org with esmtp (Exim 4.60) (envelope-from ) id 1IlZml-0008Vx-8E for emacs-devel@gnu.org; Fri, 26 Oct 2007 20:44:19 -0400 Original-Received: from rgm by fencepost.gnu.org with local (Exim 4.60) (envelope-from ) id 1IlZmk-000333-OS; Fri, 26 Oct 2007 20:44:18 -0400 X-Spook: Rule Psix airframe Delta Force Elvis Ruby Ridge X-Ran: $vZ1Z\{0?4QiX$unf#7@,S@[gBV3:x+*M4@UQSmQ~o!e9KF6aX}M9B1\gfP$+-%Flh/;8N X-Hue: cyan X-Attribution: GM In-Reply-To: (Stefan Monnier's message of "Fri, 26 Oct 2007 01:24:23 -0400") User-Agent: Gnus (www.gnus.org), GNU Emacs (www.gnu.org/software/emacs/) X-detected-kernel: by monty-python.gnu.org: Linux 2.6, seldom 2.4 (older, 4) X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "Emacs development discussions." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Original-Sender: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Errors-To: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.devel:81811 Archived-At: 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.