2 Commits
Author SHA1 Message Date
Tom Yan a27b28504d Ignore the session type when started as a user unit
If a user for reasons start the program as user unit (instead of
as a system unit or in a session), /proc/self/sessionid may result
in the inferred session type being "unspecified" and prevent
XDG_SESSION_TYPE from being leveraged (and its "x11" fallback).
2025-04-19 01:32:41 +08:00
Tom Yan 514ef6ac08 Ignore unspecified type session(s) when look through all active sessions
With modern systemd versions, there is a manager class session,
which is of type "unspecified", for each logged-in / lingering
user. Such session should be ignored when attempt to find an
appropriate session from all (non-seated) sessions, otherwise it
will prevent XDG_SESSION_TYPE (and its "x11" fallback) from being
leveraged.
2025-04-19 01:09:53 +08:00