On 30/08/2024 18:45, Erwan David wrote:
On Thu, Aug 29, 2024 at 05:14:06PM CEST, Max Nikulin <maniku...@gmail.com> said:
[Unit]
After=dbus.service ssh-agent.service
Wants=dbus.service ssh-agent.service
[Install]
WantedBy=
WantedBy=graphical-session-pre.target
[...]
The after/wants does not work (starnge since ssh-agent.service seems
to see the SSH_AUTH_SOCK variable.
Have you checked that emacs.service is started at proper moment
(journalctl --user)? At first I did not add empty WantedBy and it caused
earlier start of ssh-agent.service instead of delay of emacs.service.
It might be reasonable to start emacs from default.target, e.g. for ssh
logins (however emacs.socket to start it on demand might be better) and
updating environment using "emacsclient --eval" sounds viable.
Notice that other KDE-specific configuration (~/.config/plasma-localerc,
~/.config/plasma-workspace/env) or ~/.profile sourced by SDDM may be
ignored by emacs in the case of early start.