GNU bug report logs -
#35300
27.0.50; emacsclient on remote sessions no longer works
Previous Next
Full log
Message #35 received at 35300 <at> debbugs.gnu.org (full text, mbox):
Eli Zaretskii <eliz <at> gnu.org> writes:
>> > So you didn't have XDG_RUNTIME_DIR set? In that case, I feel I
>> > understand the issue even less, because when XDG_RUNTIME_DIR is not
>> > defined, emacsclient is supposed to fall back to the old behavior...
>>
>> IIUC, the Emacs server creates the local socket under the directory
>> pointed by XDG_RUNTIME_DIR. When emacsclient starts, if XDG_RUNTIME_DIR
>> is not set it simply does not know where to find the socket.
>
> So you are saying that XDG_RUNTIME_DIR did exist when the server was
> started,
Yes.
> but ceased to exist by the time emacsclient was started?
It didn't cease to exist. That variable is automatically set when you
log in and certain components are installed and enabled.
I ssh-ed to the machine and no XDG_RUNTIME_DIR was set on that session
because the machinery that sets it up when you log in through ssh was
disabled.
That is: at the time there was two sessions, one local with
XDG_RUNTIME_DIR set and from where the Emacs server was started and a
remote session with no XDG_RUNTIME_DIR and, therefore, with emacsclient
unable to connect to the Emacs server unless you tell it where the local
socket is.
As explained on the bug report referenced by Glenn, there are other
scenarios where XDG_RUNTIME_DIR is not set (in that case, when the Emacs
server starts as a service.)
You can read more about XDG_RUNTIME_DIR here:
https://specifications.freedesktop.org/basedir-spec/basedir-spec-latest.html#variables
This bug report was last modified 6 years and 51 days ago.
Previous Next
GNU bug tracking system
Copyright (C) 1999 Darren O. Benham,
1997,2003 nCipher Corporation Ltd,
1994-97 Ian Jackson.