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: Mon, 29 Oct 2007 13:57:55 -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 1193680695 27649 80.91.229.12 (29 Oct 2007 17:58:15 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Mon, 29 Oct 2007 17:58:15 +0000 (UTC) Cc: emacs-devel@gnu.org To: Stefan Monnier Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Mon Oct 29 18:58:17 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 1ImYsM-0002fs-St for ged-emacs-devel@m.gmane.org; Mon, 29 Oct 2007 18:58:11 +0100 Original-Received: from localhost ([127.0.0.1] helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1ImYsD-0001Be-Od for ged-emacs-devel@m.gmane.org; Mon, 29 Oct 2007 13:58:01 -0400 Original-Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1ImYsA-0001AH-8M for emacs-devel@gnu.org; Mon, 29 Oct 2007 13:57:58 -0400 Original-Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1ImYs8-00019q-Qx for emacs-devel@gnu.org; Mon, 29 Oct 2007 13:57:57 -0400 Original-Received: from [199.232.76.173] (helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1ImYs8-00019d-Kq for emacs-devel@gnu.org; Mon, 29 Oct 2007 13:57:56 -0400 Original-Received: from fencepost.gnu.org ([140.186.70.10]) by monty-python.gnu.org with esmtp (Exim 4.60) (envelope-from ) id 1ImYs8-0005rV-3h for emacs-devel@gnu.org; Mon, 29 Oct 2007 13:57:56 -0400 Original-Received: from rgm by fencepost.gnu.org with local (Exim 4.60) (envelope-from ) id 1ImYs7-0006v8-NO; Mon, 29 Oct 2007 13:57:55 -0400 X-Spook: Uzi CDC tempest Adriatic 2600 Magazine New World Order X-Ran: p3;}}'j"u7i/ZnDe5CZm]dc>Q164Q$7,b{pv_wB|l0MsEsa*Naqn5s~J~o{K\~@a00{Rfg X-Hue: yellow X-Attribution: GM In-Reply-To: (Stefan Monnier's message of "Sat, 27 Oct 2007 15:51:57 -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:82082 Archived-At: Stefan Monnier wrote: >> 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.". I can still open xterms, 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. > 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". :) host1 is the local host, running the X session, host2 is a remote host. > and then use this DISPLAY (presumably somehting like "localhost:10"): go to > your Emacs and type > > M-: (make-frame-on-display "localhost:10") RET Assuming you meant: 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. If you wanted me to ssh to host1 and start an Emacs there, then it also works. If you wanted me to start an Emacs on host1 before `ssh host2', then it's unresponsive for a few seconds, then reports: "x-create-frame-with-faces: Display localhost:10.0 can't be opened".