From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Stefan Monnier Newsgroups: gmane.emacs.bugs,gmane.emacs.pretest.bugs Subject: bug#985: 23.0.60; emacsclient -c error on first time in new SSH sessions Date: Tue, 16 Sep 2008 11:23:14 -0400 Message-ID: References: <20080916140427.31679AE46AE@mt-computer.local> Reply-To: Stefan Monnier , 985@emacsbugs.donarmstrong.com NNTP-Posting-Host: lo.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Trace: ger.gmane.org 1221580088 8704 80.91.229.12 (16 Sep 2008 15:48:08 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Tue, 16 Sep 2008 15:48:08 +0000 (UTC) Cc: emacs-pretest-bug@gnu.org, 985@emacsbugs.donarmstrong.com To: Markus Triska Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Tue Sep 16 17:49:04 2008 Return-path: Envelope-to: geb-bug-gnu-emacs@m.gmane.org Original-Received: from lists.gnu.org ([199.232.76.165]) by lo.gmane.org with esmtp (Exim 4.50) id 1KfcnU-0003dx-9E for geb-bug-gnu-emacs@m.gmane.org; Tue, 16 Sep 2008 17:49:00 +0200 Original-Received: from localhost ([127.0.0.1]:48725 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1KfcmS-0007Jm-5I for geb-bug-gnu-emacs@m.gmane.org; Tue, 16 Sep 2008 11:47:56 -0400 Original-Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1KfcmF-0007Cg-EO for bug-gnu-emacs@gnu.org; Tue, 16 Sep 2008 11:47:43 -0400 Original-Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1KfcmE-0007By-2p for bug-gnu-emacs@gnu.org; Tue, 16 Sep 2008 11:47:43 -0400 Original-Received: from [199.232.76.173] (port=35655 helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1KfcmD-0007Bo-IP for bug-gnu-emacs@gnu.org; Tue, 16 Sep 2008 11:47:41 -0400 Original-Received: from rzlab.ucr.edu ([138.23.92.77]:45644) by monty-python.gnu.org with esmtps (TLS-1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.60) (envelope-from ) id 1KfcmC-00021m-GL for bug-gnu-emacs@gnu.org; Tue, 16 Sep 2008 11:47:41 -0400 Original-Received: from rzlab.ucr.edu (rzlab.ucr.edu [127.0.0.1]) by rzlab.ucr.edu (8.13.8/8.13.8/Debian-3) with ESMTP id m8GFlYKF018432; Tue, 16 Sep 2008 08:47:35 -0700 Original-Received: (from debbugs@localhost) by rzlab.ucr.edu (8.13.8/8.13.8/Submit) id m8GFU6j6012013; Tue, 16 Sep 2008 08:30:06 -0700 X-Loop: don@donarmstrong.com Resent-From: Stefan Monnier Resent-To: bug-submit-list@donarmstrong.com Resent-CC: Emacs Bugs Resent-Date: Tue, 16 Sep 2008 15:30:06 +0000 Resent-Message-ID: Resent-Sender: don@donarmstrong.com X-Emacs-PR-Message: report 985 X-Emacs-PR-Package: emacs X-Emacs-PR-Keywords: Original-Received: via spool by 985-submit@emacsbugs.donarmstrong.com id=B985.12215786069809 (code B ref 985); Tue, 16 Sep 2008 15:30:06 +0000 Original-Received: (at 985) by emacsbugs.donarmstrong.com; 16 Sep 2008 15:23:26 +0000 Original-Received: from pruche.dit.umontreal.ca (pruche.dit.umontreal.ca [132.204.246.22]) by rzlab.ucr.edu (8.13.8/8.13.8/Debian-3) with ESMTP id m8GFNGYw009803 for <985@emacsbugs.donarmstrong.com>; Tue, 16 Sep 2008 08:23:20 -0700 Original-Received: from alfajor.home (vpn-132-204-232-38.acd.umontreal.ca [132.204.232.38]) by pruche.dit.umontreal.ca (8.14.1/8.14.1) with ESMTP id m8GFNj6m028942; Tue, 16 Sep 2008 11:23:45 -0400 Original-Received: by alfajor.home (Postfix, from userid 20848) id 3AFDF1C16A; Tue, 16 Sep 2008 11:23:15 -0400 (EDT) In-Reply-To: <20080916140427.31679AE46AE@mt-computer.local> (Markus Triska's message of "Tue, 16 Sep 2008 16:04:27 +0200 (CEST)") User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/23.0.60 (gnu/linux) X-NAI-Spam-Score: 0 X-NAI-Spam-Rules: 1 Rules triggered RV3104=0 X-detected-operating-system: by monty-python.gnu.org: GNU/Linux 2.6 (newer, 3) Resent-Date: Tue, 16 Sep 2008 11:47:42 -0400 X-BeenThere: bug-gnu-emacs@gnu.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "Bug reports for GNU Emacs, the Swiss army knife of text editors" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Original-Sender: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Errors-To: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.bugs:20567 gmane.emacs.pretest.bugs:23054 Archived-At: > On machine A (Ubuntu Intrepid), I do: > $ emacs -nw -Q -f server-start >> From machine B (OSX 10.4 or Ubuntu Intrepid running in Virtualbox), I > SSH to machine A: > $ ssh -X -Y > and then, in the SSH session, do: > $ emacsclient -c > As expected, I get an X frame on machine B. I then close that frame > (C-x 5 0) and the SSH session (C-d) and, from B, SSH to A again: > $ ssh -X -Y > When I then do "emacsclient -c" in the SSH session, it says: > Waiting for Emacs... > *ERROR*: Connection lost to X server `localhost:10.0' > When I then again do "emacsclient -c", it works without problems, and > I get again an X frame on machine B every further time I do it. I think I know what's going on: even tho you've closed the frame, Emacs did not close the X11 connection, so when you ssh in again and try "emacsclient -c" a second time (and with the same DISPLAY=localhost:10.0), Emacs tries to reuse the old connection, which fails because that X11-proxy was killed along with your first ssh session. At that point, Emacs throws away this stale connection, so that the next attempt works again. I guess Emacs could/should disconnect from the X server as soon as the last frame is closed. Stefan