Search this site


Metadata

Articles

Projects

Presentations

xscreensaver hack: show your screen while locked

There are some rare cases when you need to have your screen locked, but still have the current display visible without a screensaver or blanker.

Here's a hack to do it with xscreensaver and xdotool:

#!/bin/sh
while true; do
  xdotool search --onlyvisible --name xscreensaver \
  | xargs -r -n1 sh -c 'xdotool windowsize $1 1 1' -
  sleep 3
done
Run this and lock the screen. Every 3 seconds this script will try to shrink the xscreensaver window to 1x1 pixels and reveal your desktop below it. Useful if you need it.