This script is used to delay something in a loop that is active while
xscreensaver is running.
Since it calls `sleep` from coreutils, the effect of `sleep` not being
on $PATH is that it turns into a busy loop that does nothing, causing
a variety of problems with things like resuming from suspend if a
screenlocker is active.
Situations where coreutils might not be on $PATH are, for example,
cases where xscreensaver is launched via a systemd-unit (e.g. through
xss-lock).
I've been running xsecurelock with this change for a while (since
https://cl.tvl.fyi/c/depot/+/4403) and it has resolved these issues
for me.
According to xsecurelock's configure.ac file, each of the add
dependencies are used to:
- libXrandr: XRandR provides information about monitor layouts and is
strongly recommended on systems which can use more than one monitor
(which includes most laptops).
- libXext: The X Synchronization extension is used to get per-device idle
times. Used by until_nonidle only.
- libXScrnSaver: The X11 Screen Saver extension is used to turn off the
screen saver when X11 handles screen blanking (e.g. via timeout) anyway.
Saves CPU power.
Adding libXrandr fixes an issue where locking a screen in a multi
monitor setup results in the prompt information to not be in the middle
of the screen. The other dependencies are not tested if they fixed
something, however since upstream recommends than I think it is fair to
include them also.