From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!.POSTED!not-for-mail From: Paul Eggert Newsgroups: gmane.emacs.devel Subject: Re: emacsclient socket ownership Date: Thu, 6 Dec 2018 13:01:34 -0800 Organization: UCLA Computer Science Department Message-ID: <25577ab1-6be8-c433-534b-f14e3f70908e@cs.ucla.edu> References: <6f861707-0ca7-b380-bcdb-85962bb6694a@cs.ucla.edu> <87sgzbereu.fsf@web.de> <1ty393ojbo.fsf@fencepost.gnu.org> <83zhtj7o4n.fsf@gnu.org> <83y3937mm7.fsf@gnu.org> <0d315c0b-9997-2a7f-1f01-ab8623c1c965@cs.ucla.edu> <83tvjr6tzq.fsf@gnu.org> <67e96808-f02f-c028-7fc0-2c1e2b838e94@cs.ucla.edu> NNTP-Posting-Host: blaine.gmane.org Mime-Version: 1.0 Content-Type: multipart/mixed; boundary="------------5EBA3E59980FC6CF404BA8B3" X-Trace: blaine.gmane.org 1544129996 23540 195.159.176.226 (6 Dec 2018 20:59:56 GMT) X-Complaints-To: usenet@blaine.gmane.org NNTP-Posting-Date: Thu, 6 Dec 2018 20:59:56 +0000 (UTC) User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:60.0) Gecko/20100101 Thunderbird/60.3.1 Cc: michael_heerdegen@web.de, Eli Zaretskii , monnier@iro.umontreal.ca, emacs-devel@gnu.org To: Glenn Morris Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Thu Dec 06 21:59:51 2018 Return-path: Envelope-to: ged-emacs-devel@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 1gV0kQ-0005wL-Hg for ged-emacs-devel@m.gmane.org; Thu, 06 Dec 2018 21:59:50 +0100 Original-Received: from localhost ([::1]:43029 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1gV0mX-00058U-5W for ged-emacs-devel@m.gmane.org; Thu, 06 Dec 2018 16:02:01 -0500 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:50523) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1gV0mL-00058I-0R for emacs-devel@gnu.org; Thu, 06 Dec 2018 16:01:51 -0500 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1gV0mK-0007Sz-0E for emacs-devel@gnu.org; Thu, 06 Dec 2018 16:01:48 -0500 Original-Received: from zimbra.cs.ucla.edu ([131.179.128.68]:52770) by eggs.gnu.org with esmtps (TLS1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.71) (envelope-from ) id 1gV0mF-0007Nr-2j; Thu, 06 Dec 2018 16:01:43 -0500 Original-Received: from localhost (localhost [127.0.0.1]) by zimbra.cs.ucla.edu (Postfix) with ESMTP id 1D3651605D4; Thu, 6 Dec 2018 13:01:36 -0800 (PST) Original-Received: from zimbra.cs.ucla.edu ([127.0.0.1]) by localhost (zimbra.cs.ucla.edu [127.0.0.1]) (amavisd-new, port 10032) with ESMTP id jLoxkiPw_ZzM; Thu, 6 Dec 2018 13:01:34 -0800 (PST) Original-Received: from localhost (localhost [127.0.0.1]) by zimbra.cs.ucla.edu (Postfix) with ESMTP id E51BF160617; Thu, 6 Dec 2018 13:01:34 -0800 (PST) X-Virus-Scanned: amavisd-new at zimbra.cs.ucla.edu Original-Received: from zimbra.cs.ucla.edu ([127.0.0.1]) by localhost (zimbra.cs.ucla.edu [127.0.0.1]) (amavisd-new, port 10026) with ESMTP id vSIXNfsMs26M; Thu, 6 Dec 2018 13:01:34 -0800 (PST) Original-Received: from Penguin.CS.UCLA.EDU (Penguin.CS.UCLA.EDU [131.179.64.200]) by zimbra.cs.ucla.edu (Postfix) with ESMTPSA id C2BAA1605D5; Thu, 6 Dec 2018 13:01:34 -0800 (PST) Openpgp: preference=signencrypt Autocrypt: addr=eggert@cs.ucla.edu; prefer-encrypt=mutual; keydata= xsFNBEyAcmQBEADAAyH2xoTu7ppG5D3a8FMZEon74dCvc4+q1XA2J2tBy2pwaTqfhpxxdGA9 Jj50UJ3PD4bSUEgN8tLZ0san47l5XTAFLi2456ciSl5m8sKaHlGdt9XmAAtmXqeZVIYX/UFS 96fDzf4xhEmm/y7LbYEPQdUdxu47xA5KhTYp5bltF3WYDz1Ygd7gx07Auwp7iw7eNvnoDTAl KAl8KYDZzbDNCQGEbpY3efZIvPdeI+FWQN4W+kghy+P6au6PrIIhYraeua7XDdb2LS1en3Ss mE3QjqfRqI/A2ue8JMwsvXe/WK38Ezs6x74iTaqI3AFH6ilAhDqpMnd/msSESNFt76DiO1ZK QMr9amVPknjfPmJISqdhgB1DlEdw34sROf6V8mZw0xfqT6PKE46LcFefzs0kbg4GORf8vjG2 Sf1tk5eU8MBiyN/bZ03bKNjNYMpODDQQwuP84kYLkX2wBxxMAhBxwbDVZudzxDZJ1C2VXujC OJVxq2kljBM9ETYuUGqd75AW2LXrLw6+MuIsHFAYAgRr7+KcwDgBAfwhPBYX34nSSiHlmLC+ KaHLeCLF5ZI2vKm3HEeCTtlOg7xZEONgwzL+fdKo+D6SoC8RRxJKs8a3sVfI4t6CnrQzvJbB n6gxdgCu5i29J1QCYrCYvql2UyFPAK+do99/1jOXT4m2836j1wARAQABzSBQYXVsIEVnZ2Vy dCA8ZWdnZXJ0QGNzLnVjbGEuZWR1PsLBfgQTAQIAKAUCTIByZAIbAwUJEswDAAYLCQgHAwIG FQgCCQoLBBYCAwECH In-Reply-To: Content-Language: en-US X-detected-operating-system: by eggs.gnu.org: GNU/Linux 3.x [fuzzy] X-Received-From: 131.179.128.68 X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: "Emacs development discussions." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Original-Sender: "Emacs-devel" Xref: news.gmane.org gmane.emacs.devel:231701 Archived-At: This is a multi-part message in MIME format. --------------5EBA3E59980FC6CF404BA8B3 Content-Type: text/plain; charset=utf-8; format=flowed Content-Transfer-Encoding: 7bit On 12/6/18 12:26 PM, Glenn Morris wrote: > It would be better to refer to EMACS_SOCKET_NAME. Sure, that's easy. I installed the attached. --------------5EBA3E59980FC6CF404BA8B3 Content-Type: text/x-patch; name="0001-Mention-EMACS_SOCKET_NAME-not-XDG_RUNTIME_DIR.patch" Content-Transfer-Encoding: 7bit Content-Disposition: attachment; filename="0001-Mention-EMACS_SOCKET_NAME-not-XDG_RUNTIME_DIR.patch" >From 0e8e5da1e8da0752fc02bf590a17697af4c0afd3 Mon Sep 17 00:00:00 2001 From: Paul Eggert Date: Thu, 6 Dec 2018 12:59:42 -0800 Subject: [PATCH] Mention EMACS_SOCKET_NAME, not XDG_RUNTIME_DIR. --- doc/misc/efaq.texi | 8 ++++++-- etc/NEWS | 4 ++-- 2 files changed, 8 insertions(+), 4 deletions(-) diff --git a/doc/misc/efaq.texi b/doc/misc/efaq.texi index 19770455f1..18a857f7dc 100644 --- a/doc/misc/efaq.texi +++ b/doc/misc/efaq.texi @@ -2011,8 +2011,12 @@ Using an already running Emacs process desktop and @file{$TMPDIR/emacs@var{userid}} otherwise. See the variable @code{server-socket-dir}. Traditionally, Emacs used @file{$TMPDIR/emacs@var{userid}} even when running under an X desktop; -if you prefer this traditional (and less-secure) behavior, unset -@env{XDG_RUNTIME_DIR} before invoking Emacs and @samp{emacsclient}. +if you prefer this traditional (and less-secure) behavior, you +can set the environment variable @env{EMACS_SOCKET_NAME} to +@samp{$TMPDIR/emacs@var{userid}/server} before invoking Emacs and +@samp{emacsclient}, although it will be your responsibility to create +the directory @samp{$TMPDIR/emacs@var{userid}} with appropriate +ownership and permissions. To get your news reader, mail reader, etc., to invoke @samp{emacsclient}, try setting the environment variable @code{EDITOR} diff --git a/etc/NEWS b/etc/NEWS index e7f2d606f8..cad44f9233 100644 --- a/etc/NEWS +++ b/etc/NEWS @@ -133,8 +133,8 @@ to apply. as the directory for client/server sockets, if Emacs is running under an X Window System desktop that sets the XDG_RUNTIME_DIR environment variable to indicate where session sockets should go. -To get the old and less-secure behavior, unset XDG_RUNTIME_DIR before -invoking emacs and emacsclient. +To get the old, less-secure behavior, you can set the +EMACS_SOCKET_NAME environment variable to an appropriate value. --- *** When run by root, emacsclient no longer connects to non-root sockets. -- 2.19.2 --------------5EBA3E59980FC6CF404BA8B3--