On Fri, 30 Oct 2020 09:43:09 -0400 Zack Weinberg <[email protected]> wrote:
I’ve been experimenting with running emacs as a systemd “user
service”, which is an upstream-supported configuration (see
/usr/lib/systemd/user/emacs.service). I use GNOME for my desktop.
>
[Emacs is] not picking up all the environment variable
settings that it ought to.
I had the exactly same problem. Most prominently
(getenv "PATH") gave me the root path (including the sbin stuff).
As this not only happens for the emacs service but in general I reported
this as https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=1104693
I don't understand how systemd user startup works and how environment
variables coming from .profile etc get injected (should they at all?),
but i managed to get emacs.service working correctly with the following
=== .config/systemd/user/emacs.service.d/override.conf ===
[Service]
Environment=SSH_AUTH_SOCK=%t/keyring/ssh
Restart=on-failure
[Unit]
After=gnome-terminal-server
==========================================================
The “After=gnome-terminal-server” did the trick for me.
I hope this could help you (and others) too (there may be a better
service to rely on than gnome-terminal-server, I am not sure about this).
Greetings,
Klaus
--
http://lapiz.istik.de/
The Answer is 42. And I am the Answer. Now I am looking for the Question.