About xfce-screensaver.c

Jarno Suni sunijarno at gmail.com
Mon May 3 21:44:47 CEST 2021


On Mon, May 3, 2021 at 3:54 PM Simon Steinbeiss <simon at xfce.org> wrote:
>
> I would prefer not to meddle with DPMS and not add too many options that take the special behavior of many screensavers/lockers into account, because it implies we test them all. (And yes, I only speak for myself, even if I misleadingly said "we" in my previous message. I was merely relating to what I remember from the project's history. If anyone else wants to review/merge that's fine!)

I wonder if all added features of Xfce were tested as there are so
many bugs. I have tested the DPMS features and they work well
according to my experience.

> My comment was less about whether it's shell or C, but that I'd prefer that e.g. whether to handle DPMS or not when locking or idling should be decided by the screensaver/locker, not by Xfce and through some hidden settings that we wouldn't want to expose to the user. (At least some screenlockers do seem to take that into account and it does make some sense, as they control when the systems goes into locked state and comes out of it.)

Well, at least slock (which is hard coded in current xflock4) and
i3lock do not handle DPMS by themselves. Anyway, alternatively there
could be a separate wrapper script for the job and user could set
LockCommand to run it, so it would be independent of xflock4. I agree
it would be less confusing that way besides being more modular.

> I don't mind resolving or reducing the overlaps between session or power-manager. The "lock command" setting I introduced with Erik and the shared "Lock screen when system goes to sleep" setting between the two components were some baby steps in that direction already. For me personally it's just a matter of time and motivation...

When putting system to sleep manually, configuring locking could be
trivial: Just run `xflock4 && xfce4-session-logout --suspend` if you
want to lock with sleep, and drop the `xflock4 &&` part if you don't
want to lock. Except that "Lock screen when system goes to sleep"
setting removes this possibility (unless you use e.g. `systemctl
suspend` for putting system to sleep, instead). User may sometimes
want to lock when he/she puts system to sleep and sometimes not, and
it is inconvenient to go to session settings to choose that each time.
On the other hand, when sleep is triggered automatically or by e.g.
lid close, you obviously can not choose each time if lock should be
used or not, and thus there is need for a setting.


More information about the Xfce4-dev mailing list