Am 10.01.21 um 13:19 schrieb Tormod Volden:
On Sun, Jan 10, 2021 at 12:44 PM Michael Biebl  wrote:

Negating @system might work.
Something like ConditionUser=!@system, but untested.

Thanks! I was just about to suggest this myself after searching around for this.
(https://www.freedesktop.org/software/systemd/man/systemd.unit.html)

I also wonder if PartOf=graphical-session.target would make sure the
service is stopped when the X sessions stops.
(https://www.freedesktop.org/software/systemd/man/systemd.special.html#)

graphical-session.target looks like a better fit indeed.
E.g. I don't expect xscreensaver to start (and work), if I log in on the console. That said, graphical-session.target can also mean Wayland, which I suppose xscreensaver does not support.

graphical-session.target is something which TTBOMK is currently only implemented by GNOME. GNOME on the other hand does indeed have its own screensaver.


And maybe we should replace WantedBy=default.target by more specific
DEs, like WantedBy=xfce-session.target. I'd expect e.g. Gnome to start
its own screensaver by default.

I don't think something like xfce-session.target exists (yet)?

I also see that the systemd user task is per-user, not per-session.
Wonder what happens if a user log in twice...
"Problematic" according to https://systemd.io/DESKTOP_ENVIRONMENTS/

Right, I raised this in my initial reply.

All in all, I'm not sure, if a systemd --user service is a good fit for xscreensaver in its current state.

Michael

Attachment: OpenPGP_signature
Description: OpenPGP digital signature

Reply via email to