Enable automatic login with automatic screen lock

Nov 07, '06 07:30:03AM

Contributed by: Lycestra

Until now, my machine hasn't used auto-login because I prefer to have the security it adds. However, if the machine had rebooted for whatever reason, I lost the ability to use any non-console apps by remote (thru VLC or their own private networkable side-interface) without physically logging into it in-person.

The solution: make the system lock the screen using your login items!

I checked, and can't find an AppleScript command to lock the screen, so I instead dragged the ScreenSaverEngine.app in /System -> Library -> Frameworks -> ScreenSaver.framework -> Versions -> A -> Resources to my Account's Login Items. This will activate the screensaver a few moments after your account is logged in. A witness to this process could start apps on your dock or possibly force kill them, but the likelyhood of being able to otherwise interact with the yet-unstarted apps before the screen goes dark is low enough that I figured others might want to know how to do this (if it isn't an old one..).

Also, I mention AppleScript because I would have liked to do it that way. For those who think Active Screen Corners are too sensitive to lock your screen, open Keychain Access' preferences, and check Show Status in Menu Bar. That menu item (appears as a lock) has at the top a "Lock Screen" menu item (this has been noted in a previous hint). However, Keychain's AppleScripting doesn't make this available like I had hoped.

[robg adds: Somewhat obviously, make sure you've enabled the "require password" option for sleep and screensavers in the Security System Preferences panel.]

Comments (16)


Mac OS X Hints
http://hints.macworld.com/article.php?story=20061029084842710