There is nice free daemon called sleepwatcher; it can run some scripts on sleep or wake events. Install it and call /System -> Library -> Frameworks ->ScreenSaver.framework ->Resources -> ScreenSaverEngine.app -> Contents -> MacOS -> ScreenSaverEngine from its "sleep" script. Simple, but there is problem. If you already have ScreenSaverEngine running, a second instance will screw both of them (not deadly, but unpleasant). To prevent this, it should be called like this:
#!/bin/bash SCRS=`ps xcopid,command|grep ScreenSaverEng|cut -b1-5` if [ -z "$SCRS" ]; then # Next line is shown on TWO LINES; enter as one # without any added spaces... /System/Library/Frameworks/ScreenSaver.framework/Resources/ ScreenSaverEngine.app/Contents/MacOS/ScreenSaverEngine & sleep 3 fiThat's it. Screen Effects should be configured to lock the screen, of course.
[robg adds: I haven't tested this one, but I took a look at the sleepwatcher package. I think (hopefully someone can confirm) that you make this work by creating the above script and saving it as .sleep in your home directory (remember to make it executable). sleepwatcher then checks for the .sleep file before the system goes to sleep and locks your screen. I also can't confirm that you're then asked for the password on wake -- anyone?]

