My contribution to xflock4

Jarno Suni sunijarno at gmail.com
Wed Jun 9 11:04:18 CEST 2021


So my merge request has been around for a while:
https://gitlab.xfce.org/xfce/xfce4-session/-/merge_requests/20
Apparently it has not had much attention. Is the merge request still
somehow too difficult for reviewers? Should we have a configuration
setting for time after which a non-forking locker is regarded as
having locked successfully? (Currently it is fixed 1 s.)

I have not created a separate wrapper script for DPMS features that I
removed from xflock4 due to feedback from Simon Steinbeiss. Should
there be one? Should it be configurable by command line options or by
xfconf settings?

On Sat, Mar 27, 2021 at 9:27 PM Jarno Suni <sunijarno at gmail.com> wrote:
>
> In my local branch I also changed xfce-screensaver.c to lock by
> xflock4 only, and even that synchronously like shown by Martin
> Castillo (castilma at uni-bremen.de) a.k.a. 2.acc.von in his patch for
> for 4.14 at https://gitlab.xfce.org/xfce/xfce4-session/-/issues/15 one
> year ago.
> And changed it not to start a screensaver daemon there i.e. disabled
> everything in xfce_screensaver_setup(); though I think there is an
> issue with xfce_screensaver_inhibit() then?! I suppose the power
> manager needs some fixing, too, so that screensaver daemon starting
> would be centralized in session autostart. There is related discussion
> at https://gitlab.xfce.org/xfce/xfce4-session/-/issues/68.
>
> I don't know, if I have time to setup proper testing environment, so I
> would like to give the modified branch to people for testing and I
> (and/or someone else?) would polish it later, but I wonder if it is
> bad to rebase it after pushing the branch?
>
> Some may feel that xflock4 is ugly script, but it is handy to have a
> command for locking in command line. I suppose xflock4 could be later
> replaced by an executable binary, if there are good reasons for it.
>
> Some concerns:
> - If "lock screen before sleep" is set system should go to sleep only
> after xflock4 has exited. xscreensaver is good for testing this, as it
> has configurable "Fade to Black when Blanking" setting.
> - In my testing there is an issue in locking by xscreensaver 5.42: It
> sometimes fails with "xscreensaver-command: xscreensaver window
> unexpectedly deleted." (I have reported the developer about this, but
> he has not replied, yet.) It locks anyway and when xflock4 tries
> i3lock as fallback, it fails:  "i3lock: Cannot grab pointer/keyboard"
> - If "lock screen before sleep" is set and xflock4 fails, system
> should not go to sleep. This may be an issue, if user has configured
> system to go sleep when laptop lid is closed. Maybe there should be an
> exception in this case and let sleeping happen without lock then. Or
> could power manager give an alarming sound then to notify user?
> - Settings at Application Autostart should be honored, but Xfconf
> setting general/LockCommand may override this. If user sets the
> property, Autostart should be set accordingly, but I think it is
> user's responsibility.
> -As for DPMS, i3lock used to have --dpms options, but it was later
> removed due to some issues unknown to me. I could not contact the
> developers. Manual page of i3lock says
>
>        The  -d  (--dpms) option was removed from i3lock in version
> 2.8. There were plenty of use-cases that were not prop‐
>        erly addressed, and plenty of bugs surrounding that feature.
> While features are not normally removed  from  i3  and
>        its tools, we felt the need to make an exception in this case.
>
>        Users  who  wish  to explicitly enable DPMS only when their
> screen is locked can use a wrapper script around i3lock
>        like the following:
>
>             #!/bin/sh
>             revert() {
>               xset dpms 0 0 0
>             }
>             trap revert HUP INT TERM
>             xset +dpms dpms 5 5 5
>             i3lock -n
>             revert


More information about the Xfce4-dev mailing list