by anon4 · 11y ago · 0 comments
#!/bin/bash
set -e
while true; do
sleep 20m
xlock -allowaccess&
pid=$!
sleep 20s
kill $pid
done
Check the manpage for xlock and choose a screensaver that won't keep you looking at the monitor. #!/usr/bin/env bash
set -e
while true; do
sleep 20m
xscreensaver-command -activate
sleep 20s
xscreensaver-command -deactivate
done
This presumes that xscreensaver is configured to have a delay before it is locked (and thus requiring a password to unlock - as would happen if we used `xscreensaver-command -lock`).