Every now and then, xscreensaver dies. When it does, my session unlocks and won't lock until I restart it. Is there a way to automatically detect that xscreensaver has died, restart it, and lock the session?
Keep xscreensaver running
xscreensaver
Instead of starting xscreensaver directly, use a wrapper script.#!/bin/shprog=xscreensaverwhile :do   $prog &   waitdoneRun this script as you would xscreensaver, i.e. in the background, launched from .xinitrc or equivalent.  If xscreensaver dies, this script will notice and immediately restart it.