From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Stefan Monnier Newsgroups: gmane.emacs.devel Subject: Re: CVS trunk emacsclient: X11 connection rejected Date: Mon, 29 Oct 2007 15:16:41 -0400 Message-ID: References: <4ky7dpbd3x.fsf@fencepost.gnu.org> <6br6jhfcz0.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 1193685432 12234 80.91.229.12 (29 Oct 2007 19:17:12 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Mon, 29 Oct 2007 19:17:12 +0000 (UTC) Cc: emacs-devel@gnu.org To: Glenn Morris Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Mon Oct 29 20:17:14 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 1Ima6l-0002vq-Ve for ged-emacs-devel@m.gmane.org; Mon, 29 Oct 2007 20:17:08 +0100 Original-Received: from localhost ([127.0.0.1] helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1Ima6c-0003VO-Jw for ged-emacs-devel@m.gmane.org; Mon, 29 Oct 2007 15:16:58 -0400 Original-Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1Ima6Z-0003VI-7Y for emacs-devel@gnu.org; Mon, 29 Oct 2007 15:16:55 -0400 Original-Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1Ima6X-0003Tl-6U for emacs-devel@gnu.org; Mon, 29 Oct 2007 15:16:54 -0400 Original-Received: from [199.232.76.173] (helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1Ima6X-0003Th-22 for emacs-devel@gnu.org; Mon, 29 Oct 2007 15:16:53 -0400 Original-Received: from x-132-204-241-194.xtpr.umontreal.ca ([132.204.241.194] helo=ceviche.home) by monty-python.gnu.org with smtp (Exim 4.60) (envelope-from ) id 1Ima6S-0001py-JZ; Mon, 29 Oct 2007 15:16:49 -0400 Original-Received: by ceviche.home (Postfix, from userid 20848) id 419ACB4ABE; Mon, 29 Oct 2007 15:16:41 -0400 (EDT) In-Reply-To: (Glenn Morris's message of "Mon, 29 Oct 2007 13:57:55 -0400") User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/23.0.50 (gnu/linux) X-detected-kernel: by monty-python.gnu.org: Genre and OS details not recognized. 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:82089 Archived-At: >>> I did try a test with an unset XAUTHORITY: >> host1> XAUTHORITY= emacs -Q -f server-start & host1> ssh host2 host2> ssh host1 emacsclient --no-wait $PWD/README >> >>> and it didn't seem to help. > OK, so the above definitely doesn't change anything, I still get "X11 > connection rejected". > If instead I unset XAUTHORITY before starting Emacs, or set it to > ~/.Xauthority, then `ssh host2' warns "No xauth data; using fake > authentication data for X11 forwarding.". If you do host1> XAUTHORITY= xterm is an xterm created? What does `xhost' say? > emacs, etc. Now the emacsclient command (with no display option) shows > the behaviour of popping up a new frame of the server Emacs showing > scratch, and not visiting the specified file at all. That's good: the separate frame is normal (it's because the emacsclient uses display "localhost:10.0" which Emacs can't know is the same as display ":0.0"), and the "2 frames but no file" problem is "known" (you already reported it) and is unrelated to X11 connection problems. >> What happens if you do host2> ssh host1 host1> echo "$DISPLAY" > Is that meant to be that way round? I should have used better names > than "host1", "host2". :) I meant just that: assuminh you already have a shell on host2 (probably via ssh), that was meant to say: do "ssh host1" to log back onto the local computer. And in this new interactive shell use `echo "$DISPLAY"' to get the display number chosen by ssh. The interactive shell is also used just to keep the connection open. host1> ssh host2 host2> ssh host1 'echo $DISPLAY' # localhost:10.0 host2> emacs -Q --eval '(make-frame-on-display "localhost:10.0")' > then it works. Huh? Really? How can it? `localhost:10.0' proxy display should be created by the `ssh host1' and destroyed as soon as `ssh host1' terminates. Maybe it's a side effect of the connection sharing feature of "recent" OpenSSH? Stefan