#!/bin/sh # 10xscreensaver-lock - lock all xscreensavers on hibernate/suspend export XAUTHORITY DISPLAY case $1 in hibernate|suspend) for XAUTHORITY in /home/*/.Xauthority; do for DISPLAY in $(xauth list | sed 's/^[^:]*//;s/ .*//' | sort -u); do xscreensaver-command --lock & done done wait;; esac