The goal: lock the screen with standard Screen Effects automatically, right before switching the Mac to sleep state. This is a standard security precaution, and I don't know why it's not implemented in Jaguar, but here is a workaround.
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.
Mac OS X Hints
http://hints.macworld.com/article.php?story=2003071420174010