bug-gnu-emacs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

bug#985: marked as done (23.0.60; emacsclient -c error on first time in


From: Emacs bug Tracking System
Subject: bug#985: marked as done (23.0.60; emacsclient -c error on first time in new SSH sessions)
Date: Tue, 7 Oct 2008 11:00:03 -0700

Your message dated Tue, 07 Oct 2008 13:51:38 -0400
with message-id <87wsgkthsl.fsf@cyd.mit.edu>
and subject line Re: 23.0.60; emacsclient -c error on first time in new SSH 
sessions
has caused the Emacs bug report #985,
regarding 23.0.60; emacsclient -c error on first time in new SSH sessions
to be marked as done.

This means that you claim that the problem has been dealt with.
If this is not the case it is now your responsibility to reopen the
bug report if necessary, and/or fix the problem forthwith.

(NB: If you are a system administrator and have no idea what this
message is talking about, this may indicate a serious mail system
misconfiguration somewhere. Please contact don@donarmstrong.com
immediately.)


-- 
985: http://emacsbugs.donarmstrong.com/cgi-bin/bugreport.cgi?bug=985
Emacs Bug Tracking System
Contact don@donarmstrong.com with problems
--- Begin Message --- Subject: 23.0.60; emacsclient -c error on first time in new SSH sessions Date: Tue, 16 Sep 2008 16:04:27 +0200 (CEST)
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 <machine A>

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 <machine A>

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.

In GNU Emacs 23.0.60.4 (i386-apple-darwin8.11.1, GTK+ Version 2.12.9)
 of 2008-09-14 on mt-computer.local
Windowing system distributor `The XFree86 Project, Inc', version 11.0.40400000
Important settings:
  value of $LC_ALL: nil
  value of $LC_COLLATE: nil
  value of $LC_CTYPE: nil
  value of $LC_MESSAGES: nil
  value of $LC_MONETARY: nil
  value of $LC_NUMERIC: nil
  value of $LC_TIME: nil
  value of $LANG: en.UTF-8
  value of $XMODIFIERS: nil
  locale-coding-system: nil
  default-enable-multibyte-characters: t




--- End Message ---
--- Begin Message --- Subject: Re: 23.0.60; emacsclient -c error on first time in new SSH sessions Date: Tue, 07 Oct 2008 13:51:38 -0400
> > On machine A, I do:
> >    $ emacs -nw -Q -f server-start
> > From machine B, I SSH to machine A:
> >    $ ssh -X -Y <machine A>
> >    $ 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 <machine A>
> > When I then do "emacsclient -c" in the SSH session, it says:
> >    Waiting for Emacs...
> >    *ERROR*: Connection lost to X server `localhost:10.0'
>
> 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.

Emacs does attempt to close the connection: see x_delete_terminal in
xterm.c:10634.  With GTK support, this calls xg_display_close, which
tries to keep a display open to avoid a GTK crash when no default
display exists.  This prevents the display from disconnecting properly.

I've just installed a fix that allows Emacs to disconnect properly,
while still avoiding the GTK crash.


--- End Message ---

reply via email to

[Prev in Thread] Current Thread [Next in Thread]