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

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

bug#985: 23.0.60; emacsclient -c error on first time in new SSH sessions


From: Stefan Monnier
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
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/23.0.60 (gnu/linux)

> 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.

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






reply via email to

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