On Sat, 2020-05-23 at 13:07 +0100, Colin Watson wrote: > What do you think?
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. You could of course check the session type, but I'm not sure what sets that environment variable and if it is present for all Wayland compositors. It is also a per-session variable rather than per-user variable. So I think my idea of checking if Xsession.options exists is best after all. $ sudo sh -c "tr '\0' '\n' < /proc/$(pgrep ssh-agent)/environ" | grep DISPLAY $ sudo sh -c "tr '\0' '\n' < /proc/$(pgrep ssh-agent)/environ" | grep -i wayland XDG_SESSION_TYPE=wayland -- bye, pabs https://wiki.debian.org/PaulWise
signature.asc
Description: This is a digitally signed message part