Also set xscreensaver.lock property to force lock independently from the
current settings.
! Blank after x time (h:mm:ss).
xscreensaver.timeout: 0:10:00
-! Lock screen after x time.
+! Lock screen after x time _after_ blank.
xscreensaver.lockTimeout: 2:00:00
-! Immediately lock when timeout is reached.
+! Require password to unlock after blank.
xscreensaver.lock: True
! No fade effects, enable/disable monitor immediately.
# [1]: https://stackoverflow.com/questions/3748432/insane-crond-behavior-keeps-making-defunct-bash-processes/3750028#3750028
if installed xscreensaver; then
- echo "xscreensaver.lockTimeout: $lock_time_minutes" | xrdb -merge
+ printf 'xscreensaver.timeout: %d
+ xscreensaver.lock: True
+ xscreensaver.lockTimeout: 0
+ ' "$lock_time_minutes" | xrdb -merge
xscreensaver >/dev/null &
echo xscreensaver
elif installed xautolock; then