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. You may try to suppress starting of ssh-agent
through Xsession and use either ssh-agent.service or
systemctl --user list-sockets '*ssh*'
LISTEN UNIT ACTIVATES
/run/user/1000/gnupg/S.gpg-agent.ssh gpg-agent-ssh.socket gpg-agent.service