On Thu 2018-01-25 22:53:18 +0100, Thomas Goirand wrote: > so really, it looks like systemd is the badly configured thing here.
I don't see how systemd is "badly configured" -- the user service starts up gpg-agent the first time it's needed. gpg-agent itself invokes pinentry in order to talk to the user, so pinentry needs to know some sort of environment information. if you use pinentry-gnome3 (which is the preferred graphical pinentry) it just needs to know the $DBUS_SESSION_BUS_ADDRESS, which should be already available because the bus is already available at the time the service is launched. This will work whether you're running Wayland or X11. if you use pinentry-gtk2 or pinentry-qt within an X11 session, then gpg-agent needs to know $DISPLAY and $XAUTHORITY so it can launch pinentry. These variables should be set into the systemd user service activation environment when you log into a graphical session. (i expect "dbus-update-activation-environment --systemd DISPLAY XAUTHORITY" to be invoked by however you start your X session -- if it's not happening, that'd be good to know) so as long as you don't try to use gpg-agent (either as ssh-agent or as gpg-agent, or by explicitly "systemctl --user start gpg-agent.service") before you've logged into your graphical user session, when gpg-agent is launched, it will already know how to prompt you for a password for ssh, and you shouldn't need to manually run workarounds like: gpg-connect-agent updatestartuptty /bye If you can tell me how you start up your graphical session, maybe we can track down the problem further. Regards, --dkg
signature.asc
Description: PGP signature