GNU bug report logs -
#33847
27.0.50; emacsclient does not find server socket
Previous Next
Reported by: Ulrich Mueller <ulm <at> gentoo.org>
Date: Sun, 23 Dec 2018 09:49:01 UTC
Severity: normal
Tags: patch
Merged with 41707
Found in version 27.0.50
Fixed in version 28.1
Done: Lars Ingebrigtsen <larsi <at> gnus.org>
Bug is archived. No further changes may be made.
Full log
Message #5 received at submit <at> debbugs.gnu.org (full text, mbox):
The master branch was recently updated to place the server socket in
XDG_RUNTIME_DIR, with a fallback to the previous TMPDIR location.
This will make emacsclient fail when the server has been started from
an environment where XDG_RUNTIME_DIR is not set.
For example, if emacs --daemon is started on a Gentoo system via
OpenRC's start-stop-daemon, then emacs will create the socket in
${TMPDIR}/emacs${UID}/, but emacsclient (in the user's X session)
will search for it in ${XDG_RUNTIME_DIR}/emacs/:
$ emacsclient -c
emacsclient: can't find socket; have you started the server?
emacsclient: To start the server in Emacs, type "M-x server-start".
emacsclient: No socket or alternate editor. Please use:
--socket-name
--server-file (or environment variable EMACS_SERVER_FILE)
--alternate-editor (or environment variable ALTERNATE_EDITOR)
(The reason is of course that start-stop-daemon does not set the XDG_*
variables. However, I don't see how it could do that in any reasonable
way. Presumably it would have to happen via PAM and ConsoleKit, but the
latter doesn't have a display at that point.)
Suggested solutions:
- Create the socket in a dir that is more readily available, for example
somewhere under ${HOME}/emacs.d/, or
- Have emacsclient fall back to TMPDIR as well when no socket is found
under XDG_RUNTIME_DIR.
This bug report was last modified 3 years and 225 days ago.
Previous Next
GNU bug tracking system
Copyright (C) 1999 Darren O. Benham,
1997,2003 nCipher Corporation Ltd,
1994-97 Ian Jackson.