emacs-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

emacsclient and XAUTHORITY variable


From: Ulrich Mueller
Subject: emacsclient and XAUTHORITY variable
Date: Sun, 2 Aug 2015 23:49:08 +0200

The following came up in https://bugs.gentoo.org/555346 where a user
complained that the XAUTHORITY variable in emacsclient's environment
wouldn't be honoured. I closed that Gentoo bug report, arguing that
"[...] the emacs daemon needs to read X authentication information
from the ~/.Xauthority file. Storing this information in a different
place and pointing XAUTHORITY to it won't work, because the daemon
cannot see this XAUTHORITY variable in its environment."

Thinking about it again, I wonder if this wasn't a premature
conclusion. Creating a frame with emacsclient and calling

   (getenv "XAUTHORITY" (selected-frame))

in the newly created frame shows that XAUTHORITY (or in fact, any
variable from emacsclient's environment) will be passed on to the
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?

There is also bug http://debbugs.gnu.org/1467 which seems to be
related.

Ulrich



reply via email to

[Prev in Thread] Current Thread [Next in Thread]