From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!.POSTED!not-for-mail From: Ulrich Mueller Newsgroups: gmane.emacs.bugs Subject: bug#33847: 27.0.50; emacsclient does not find server socket Date: Sun, 23 Dec 2018 10:48:16 +0100 Message-ID: NNTP-Posting-Host: blaine.gmane.org Mime-Version: 1.0 Content-Type: text/plain X-Trace: blaine.gmane.org 1545558429 27836 195.159.176.226 (23 Dec 2018 09:47:09 GMT) X-Complaints-To: usenet@blaine.gmane.org NNTP-Posting-Date: Sun, 23 Dec 2018 09:47:09 +0000 (UTC) User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/27.0.50 (gnu/linux) To: 33847@debbugs.gnu.org Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Sun Dec 23 10:47:05 2018 Return-path: Envelope-to: geb-bug-gnu-emacs@m.gmane.org Original-Received: from lists.gnu.org ([208.118.235.17]) by blaine.gmane.org with esmtp (Exim 4.84_2) (envelope-from ) id 1gb0Lh-00078h-D3 for geb-bug-gnu-emacs@m.gmane.org; Sun, 23 Dec 2018 10:47:05 +0100 Original-Received: from localhost ([::1]:51786 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1gb0Nl-0002ZJ-QQ for geb-bug-gnu-emacs@m.gmane.org; Sun, 23 Dec 2018 04:49:13 -0500 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:54550) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1gb0Nd-0002Y7-Hm for bug-gnu-emacs@gnu.org; Sun, 23 Dec 2018 04:49:06 -0500 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1gb0Na-0003Fm-BR for bug-gnu-emacs@gnu.org; Sun, 23 Dec 2018 04:49:05 -0500 Original-Received: from debbugs.gnu.org ([208.118.235.43]:56290) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1gb0Na-0003FT-7n for bug-gnu-emacs@gnu.org; Sun, 23 Dec 2018 04:49:02 -0500 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1gb0Na-00015P-11 for bug-gnu-emacs@gnu.org; Sun, 23 Dec 2018 04:49:02 -0500 X-Loop: help-debbugs@gnu.org Resent-From: Ulrich Mueller Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Sun, 23 Dec 2018 09:49:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: report 33847 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: X-Debbugs-Original-To: bug-gnu-emacs@gnu.org Original-Received: via spool by submit@debbugs.gnu.org id=B.15455585174140 (code B ref -1); Sun, 23 Dec 2018 09:49:01 +0000 Original-Received: (at submit) by debbugs.gnu.org; 23 Dec 2018 09:48:37 +0000 Original-Received: from localhost ([127.0.0.1]:60548 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1gb0NB-00014i-49 for submit@debbugs.gnu.org; Sun, 23 Dec 2018 04:48:37 -0500 Original-Received: from eggs.gnu.org ([208.118.235.92]:54316) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1gb0N8-00014U-An for submit@debbugs.gnu.org; Sun, 23 Dec 2018 04:48:34 -0500 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1gb0N2-0002pY-EP for submit@debbugs.gnu.org; Sun, 23 Dec 2018 04:48:29 -0500 Original-Received: from lists.gnu.org ([2001:4830:134:3::11]:36229) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_256_CBC_SHA1:32) (Exim 4.71) (envelope-from ) id 1gb0N2-0002pS-BQ for submit@debbugs.gnu.org; Sun, 23 Dec 2018 04:48:28 -0500 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:54314) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1gb0N1-0002Ui-KD for bug-gnu-emacs@gnu.org; Sun, 23 Dec 2018 04:48:28 -0500 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1gb0My-0002ni-Dy for bug-gnu-emacs@gnu.org; Sun, 23 Dec 2018 04:48:27 -0500 Original-Received: from dev.gentoo.org ([2001:470:ea4a:1:5054:ff:fec7:86e4]:44149 helo=smtp.gentoo.org) by eggs.gnu.org with esmtps (TLS1.0:DHE_RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1gb0My-0002f4-8A for bug-gnu-emacs@gnu.org; Sun, 23 Dec 2018 04:48:24 -0500 Original-Received: from a1i15 (host2092.kph.uni-mainz.de [134.93.134.92]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) (Authenticated sender: ulm) by smtp.gentoo.org (Postfix) with ESMTPSA id F390F335C6F; Sun, 23 Dec 2018 09:48:19 +0000 (UTC) X-detected-operating-system: by eggs.gnu.org: Genre and OS details not recognized. X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6.x X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] X-Received-From: 208.118.235.43 X-BeenThere: bug-gnu-emacs@gnu.org List-Id: "Bug reports for GNU Emacs, the Swiss army knife of text editors" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Original-Sender: "bug-gnu-emacs" Xref: news.gmane.org gmane.emacs.bugs:153778 Archived-At: 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.