4

How can I activate the screen saver immediately after Mac OS X (10.6) logs me in automatically? I want the computer to reboot and log me in after a power failure, but I don't want it to be accessible to someone who happens to be standing nearby.

4
  • I don't understand the point. If you just set it to require a login on reboot, isn't that equivalent behaviour?
    – ghoppe
    Commented Sep 3, 2010 at 15:10
  • @ghoppe logging in and locking the computer means you won't have to wait for the desktop environment to load. Commented Sep 3, 2010 at 15:48
  • Thanks. An Automator action also works the same way. The loss in security is slight. This will keep people out unless they they take advantage of physical access to reset passwords, etc.
    – user48423
    Commented Sep 3, 2010 at 17:31
  • Another (bit more expensive) solution: buy an SSD.
    – jsejcksn
    Commented Jun 17, 2011 at 2:31

2 Answers 2

4

The system actually has built-in support for doing this:

defaults write /Library/Preferences/com.apple.loginwindow autoLoginUserScreenLocked -bool true
5
  • Can you link to documentation on the developer site for this? Where did you find this?
    – jsejcksn
    Commented Jun 17, 2011 at 2:32
  • Which versions of OS X support this plist key that you know of. I'm going to look more into this.
    – jsejcksn
    Commented Jun 17, 2011 at 3:59
  • Works on 10.6. Does NOT appear to work on 10.5. If you find out anything else, let me know.
    – Gannet
    Commented Jun 18, 2011 at 10:51
  • This doesn't seem to persist beyond one reboot on El Capitan... Commented May 11, 2016 at 8:27
  • I never thoroughly tested this, from memory it didn't work on 10.7 so it's interesting to hear that it partially works on El Capitan. Are you saying it works once but then the settings is deleted? Perhaps you could lock the plist file to prevent it from being deleted.
    – Gannet
    Commented May 11, 2016 at 23:34
3

Add a login script. It could either be done via the Shell:

open -a ScreenSaverEngine

or via Applescript:

tell application "ScreenSaverEngine" to launch

Applescript is probably the easiest way if you're not familiar with Shell scripting. Open Script Editor (Spotlight it), paste in the above script, and click File->Save As. Select Application as the file format. Save it somewhere, ~/Applications, ~/Library/Scripts, etc. Open up Accounts.prefPane, click on the login items tab for your account, hit the add button, then go find where you saved your script to.

If you're really that concerned about security though, you should disable autologin.

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .