On 23/08/2024 23:30, Max Nikulin wrote:
On 23/08/2024 23:09, Erwan David wrote:
Ok, it could work, ilf only ssh-agent was not started with a random
socket name...
And I do not see what starts it (I see the process ssh-agent
/usr/bin/startplasma-x11 but I did not find which service starts it)
It is started by /etc/X11/Xsession.d/90x11-common_ssh-agent
The question is why emacs.service is started before
/usr/lib/openssh/agent-launch or plasma copies SSH_AUTH_SOCKET value to
systemd environment.
Looking into "journalctl --user -b" and checking environment of
processes started before and after "Started dbus.service - D-Bus User
Message Bus.", it should be enough to add a drop-in for emacs.service with
After=dbus.service
Wants=dbus.service
or Requires instead of Wants.
emacs.service may be started lazily by adding emacs.socket. However unit
dependency should be explicitly set anyway.