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 22:43:38 -0400 Message-ID: References: <4ky7dpbd3x.fsf@fencepost.gnu.org> NNTP-Posting-Host: lo.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Trace: ger.gmane.org 1193453032 29824 80.91.229.12 (27 Oct 2007 02:43:52 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Sat, 27 Oct 2007 02:43:52 +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 04:43:53 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 1IlbeS-0008FB-Px for ged-emacs-devel@m.gmane.org; Sat, 27 Oct 2007 04:43:53 +0200 Original-Received: from localhost ([127.0.0.1] helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1IlbeK-0005Ll-6W for ged-emacs-devel@m.gmane.org; Fri, 26 Oct 2007 22:43:44 -0400 Original-Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1IlbeH-0005LP-7F for emacs-devel@gnu.org; Fri, 26 Oct 2007 22:43:41 -0400 Original-Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1IlbeG-0005LC-LF for emacs-devel@gnu.org; Fri, 26 Oct 2007 22:43:40 -0400 Original-Received: from [199.232.76.173] (helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1IlbeG-0005L7-Fp for emacs-devel@gnu.org; Fri, 26 Oct 2007 22:43:40 -0400 Original-Received: from fencepost.gnu.org ([140.186.70.10]) by monty-python.gnu.org with esmtp (Exim 4.60) (envelope-from ) id 1IlbeF-00064m-VL for emacs-devel@gnu.org; Fri, 26 Oct 2007 22:43:40 -0400 Original-Received: from rgm by fencepost.gnu.org with local (Exim 4.60) (envelope-from ) id 1IlbeF-0000mr-6R; Fri, 26 Oct 2007 22:43:39 -0400 X-Spook: emc Ft. Bragg world domination kilderkin Kennedy X-Ran: ]`oHF_RYa*|dk\*+/6:f>&b$;P{Pc#rUx!Hs.WY5h-zMiM^]mkE|ZC0)>^px]8JsSNAK~/ X-Hue: black X-Attribution: GM In-Reply-To: (Stefan Monnier's message of "Fri, 26 Oct 2007 22:16:13 -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:81821 Archived-At: Stefan Monnier wrote: >> Should I be trying to debug ssh or Emacs, or both? `ssh -vvv' doesn't >> tell me much. Some snippets: > > Both? OK; I don't really know what to do with the server though. > I'm not sure i understand what the above refers to. Does the debug output > correspond to a run of `ssh' where ssh runs `emasclient' where the second > one runs `xterm'? All the debug output corresponds to ssh running emacsclient. There's a gap in the middle where I snipped irrelevant info. The debug output when running xterm is basically the same, without the error at the end. > What about an `ssh -vvv' that runs `emacs'? As above, but followed by some stuff that looks like opening and closing windows and is probably irrevelant. Continuing from where the last log left off: debug1: confirm x11 debug2: channel 1: rcvd eof debug2: channel 1: output open -> drain debug2: channel 1: obuf empty debug2: channel 1: close_write debug2: channel 1: output drain -> closed debug1: channel 1: FORCE input drain debug2: channel 1: ibuf empty debug2: channel 1: send eof debug2: channel 1: input drain -> closed debug2: channel 1: send close debug3: channel 1: will not send data after close debug2: channel 1: rcvd close debug3: channel 1: will not send data after close debug2: channel 1: is dead debug2: channel 1: garbage collecting debug1: channel 1: free: x11, nchannels 2 debug3: channel 1: status: The following connections are open: #0 client-session (t4 r0 i0/0 o0/0 fd 4/5 cfd -1) #1 x11 (t4 r2 i3/0 o3/0 fd 7/7 cfd -1) debug3: channel 1: close_fds r 7 w 7 e -1 c -1 debug1: client_input_channel_open: ctype x11 rchan 2 win 65536 max 16384 debug1: client_request_x11: request from 127.0.0.1 54950 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: channel 1: rcvd eof debug2: channel 1: output open -> drain debug2: channel 1: obuf empty debug2: channel 1: close_write debug2: channel 1: output drain -> closed debug1: channel 1: FORCE input drain debug2: channel 1: ibuf empty debug2: channel 1: send eof debug2: channel 1: input drain -> closed debug2: channel 1: send close debug3: channel 1: will not send data after close debug2: channel 1: rcvd close debug3: channel 1: will not send data after close debug2: channel 1: is dead debug2: channel 1: garbage collecting debug1: channel 1: free: x11, nchannels 2 debug3: channel 1: status: The following connections are open: #0 client-session (t4 r0 i0/0 o0/0 fd 4/5 cfd -1) #1 x11 (t4 r2 i3/0 o3/0 fd 7/7 cfd -1) debug3: channel 1: close_fds r 7 w 7 e -1 c -1 debug1: client_input_channel_open: ctype x11 rchan 2 win 65536 max 16384 debug1: client_request_x11: request from 127.0.0.1 54951 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 [Emacs ready for use at this point] > Can you check the .Xauthority file and XAUTHORITY envvars? On host1, XAUTHORITY=/tmp/.gdmES6K0T. This file has not been updated for a few hours. There is a separate ~/.Xauthority file, which is updated by ssh running emacsclient, emacs or xterm. On host2, XAUTHORITY is unset. > Basically compare their value in the `emacs' process from their > value at the other end of the `ssh' tunnel: ssh normally creates a > new Xauthority cookie for the "localhost:10" proxy display. It can > then either place it in ~/.Xauthority or in some other file, in > which case it needs to set the XAUTHORITY envvar, but then the > `emacs' process won't know about it. ssh is definitely placing things in ~/.Xauthority. Starting my server Emacs on host1 with an empty XAUTHORITY does not help. > This is probably because your current DISPLAY is not ":0" but > something slightly different, like ":0.0". You are exactly right. :) > Take a look at M-: (frame-parameter nil 'display) RET and then try > the above test with that display argument. It works. > server.el should probably try to normalize the DISPLAY value, but > I'm not sure what kind of normalization should be performed, so if > you can tell us what is your situation, maybe we can get the code to > DTRT for you. On host1, DISPLAY = :0.0 On host2, DISPLAY = localhost:10.0 > That's a bug. What happens to the frame that pops up? Does it stick > around, displaying some unrelated buffer? Or does it disappear? Is > the buffer displayed elsewhere? Is the buffer not displayed but kept > (i.e. it appears in the buffer list)? The frame that pops up persists, displaying the `*scratch*' buffer. The README file does not appear in the buffer-list at all. There's no indication Emacs has tried to visit it (nothing in Messages). The frame that pops up has (frame-parameter nil 'display) == :0