From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Ulrich Mueller Newsgroups: gmane.emacs.devel Subject: Re: emacsclient and XAUTHORITY variable Date: Sun, 9 Aug 2015 01:07:49 +0200 Message-ID: <21958.35781.182580.545557@a1i15.kph.uni-mainz.de> References: <21950.36948.623458.877642@a1i15.kph.uni-mainz.de> NNTP-Posting-Host: plane.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit X-Trace: ger.gmane.org 1439075302 29793 80.91.229.3 (8 Aug 2015 23:08:22 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Sat, 8 Aug 2015 23:08:22 +0000 (UTC) Cc: emacs-devel@gnu.org To: Stefan Monnier Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Sun Aug 09 01:08:14 2015 Return-path: Envelope-to: ged-emacs-devel@m.gmane.org Original-Received: from lists.gnu.org ([208.118.235.17]) by plane.gmane.org with esmtp (Exim 4.69) (envelope-from ) id 1ZODDp-0005CY-Er for ged-emacs-devel@m.gmane.org; Sun, 09 Aug 2015 01:08:13 +0200 Original-Received: from localhost ([::1]:53984 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1ZODDo-0005BM-G0 for ged-emacs-devel@m.gmane.org; Sat, 08 Aug 2015 19:08:12 -0400 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:57965) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1ZODDk-00059f-KX for emacs-devel@gnu.org; Sat, 08 Aug 2015 19:08:09 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1ZODDh-0002jX-Cz for emacs-devel@gnu.org; Sat, 08 Aug 2015 19:08:08 -0400 Original-Received: from a1www.kph.uni-mainz.de ([134.93.134.1]:35666) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1ZODDh-0002i2-4C for emacs-devel@gnu.org; Sat, 08 Aug 2015 19:08:05 -0400 Original-Received: from a1i15.kph.uni-mainz.de (a1i15.kph.uni-mainz.de [134.93.134.92]) by a1www.kph.uni-mainz.de (8.14.9/8.14.7) with ESMTP id t78N7qqi006433; Sun, 9 Aug 2015 01:07:52 +0200 Original-Received: from a1i15.kph.uni-mainz.de (localhost [127.0.0.1]) by a1i15.kph.uni-mainz.de (8.14.8/8.14.2) with ESMTP id t78N7qaV001165; Sun, 9 Aug 2015 01:07:52 +0200 Original-Received: (from ulm@localhost) by a1i15.kph.uni-mainz.de (8.14.8/8.14.8/Submit) id t78N7nk6001159; Sun, 9 Aug 2015 01:07:49 +0200 In-Reply-To: X-Mailer: VM 8.2.0b under 24.3.1 (x86_64-pc-linux-gnu) X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] X-Received-From: 134.93.134.1 X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.1.14 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-bounces+ged-emacs-devel=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.devel:188629 Archived-At: >>>>> On Thu, 06 Aug 2015, Stefan Monnier wrote: >> frame's "environment" parameter. So Emacs has all information which >> is necessary, and I wonder if this couldn't be passed to the Xau >> library before opening the X display for the new frame? > I'm pretty sure that in theory it can be handled, indeed. > I don't know how much work it would entail in practice. I've started to look into it, and it seems that Xau wasn't designed with that problem in mind. The relevant function is XauFileName, which checks the XAUTHORITY environment variable, or otherwise defaults to ~/.Xauthority. Other than that, there is no way of telling Xau about the file's location. Neither can it handle multiple auth files. So about the only possibility would be to temporarily add the XAUTHORITY variable to Emacs' environment (that is, the real environment, not 'process-environment') before opening the X display. Not sure if this could be implemented without being too fragile. > I must say that I find it a pain in the rear (as a plain user) that > gdm3 started to set XAUTHORITY rather than to put the auth data > where god intended it to be (i.e. ~/.Xauthority). "emacsclient" is > not the only victim, so I'm not highly motivated to fix the problem > on Emacs's side. I agree, everyone using ~/.Xauthority would be the better solution. Ulrich