On Sat, May 23, 2020 at 08:18:55PM +0800, Paul Wise wrote: > I don't think that will work because neither of the DISPLAY nor > WAYLAND_DISPLAY environment variables are set for user services since > they are user services *not* session services and systemd does not > support session services.
Whatever manages graphical session should set and clean up those vars in systemd activation environment. I.e. Gnome, KDE sessions do that. For independent Wayland compositors there is https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=1074367 (recently Hyprland officially started using/recommending it). But: Chris Mitchell wrote: > Maybe I'm being hopelessly naive, but is there any value in tying > ssh-agent to X11/Wayland or trying to make it behave like a session > service (as opposed to a user service), or having this "agent-launch" > init script at all? I agree. No need for extra scripts and wrappers here. And binding it to graphical session makes little sense. It should be either on or off for user.