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: Fri, 26 Oct 2007 01:24:23 -0400 Message-ID: References: NNTP-Posting-Host: lo.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Trace: ger.gmane.org 1193376342 11579 80.91.229.12 (26 Oct 2007 05:25:42 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Fri, 26 Oct 2007 05:25:42 +0000 (UTC) Cc: emacs-devel@gnu.org To: Glenn Morris Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Fri Oct 26 07:25:44 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 1IlHhW-000224-C6 for ged-emacs-devel@m.gmane.org; Fri, 26 Oct 2007 07:25:42 +0200 Original-Received: from localhost ([127.0.0.1] helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1IlHhN-0007fG-Qd for ged-emacs-devel@m.gmane.org; Fri, 26 Oct 2007 01:25:33 -0400 Original-Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1IlHgO-0007NL-5i for emacs-devel@gnu.org; Fri, 26 Oct 2007 01:24:32 -0400 Original-Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1IlHgM-0007MF-CK for emacs-devel@gnu.org; Fri, 26 Oct 2007 01:24:31 -0400 Original-Received: from [199.232.76.173] (helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1IlHgL-0007M7-W0 for emacs-devel@gnu.org; Fri, 26 Oct 2007 01:24:30 -0400 Original-Received: from tomts43.bellnexxia.net ([209.226.175.110] helo=tomts43-srv.bellnexxia.net) by monty-python.gnu.org with esmtp (Exim 4.60) (envelope-from ) id 1IlHgH-0004SO-P5; Fri, 26 Oct 2007 01:24:25 -0400 Original-Received: from ceviche.home ([74.12.207.144]) by tomts43-srv.bellnexxia.net (InterMail vM.5.01.06.13 201-253-122-130-113-20050324) with ESMTP id <20071026052424.FDPF26794.tomts43-srv.bellnexxia.net@ceviche.home>; Fri, 26 Oct 2007 01:24:24 -0400 Original-Received: by ceviche.home (Postfix, from userid 20848) id 1E1EFB4A95; Fri, 26 Oct 2007 01:24:23 -0400 (EDT) In-Reply-To: (Glenn Morris's message of "Thu\, 25 Oct 2007 20\:57\:27 -0400") User-Agent: Gnus/5.11 (Gnus v5.11) Emacs/23.0.50 (gnu/linux) X-detected-kernel: by monty-python.gnu.org: Solaris 8 (1) 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:81746 Archived-At: > With Emacs 22, and two GNU/Linux hosts with a common (NFS) > file-system, I can do this: >> From an X-session running on host1: host1> emacs -Q -f server-start & host1> ssh host2 host2> ssh host1 emacsclient --no-wait $PWD/README > which visits the README file in the Emacs running on host1. I often > find this convenient, because I often ssh between various machines and > want to have a single Emacs instance. (The "emacsclient" part is > hidden inside an "emacs" wrapper script that Does The Right Thing > according to the situation.) > If I try the same thing with the CVS trunk, then I get the following > error when trying to run emacsclient: > 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? > Is this a multi-tty side-effect, and is there any way around this? Or > should I be doing this a different way now? > (A common file-system is not necessary to see this, you can call > emacsclient to edit eg /tmp/foo.) 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 or ssh host1 DISPLAY= emacsclient --no-wait $PWD/README Basically, in Emacs-22 I added the "--display" arg to emacsclient, but made it default to "nothing" rather than to "$DISPLAY", so you had to use "--display $DISPLAY" if you wanted to display frames on the current display. In the multi-tty code, the default has been changed to "$DISPLAY". My choice for the behavior in Emacs-22 was based on the desire to preserve the existing behavior. I'm not sure which of the two is best, but the new behavior should work about as well usually and better in cases where you use several different X11 displays on different machines. Stefan