Mac OS X - auto login followed by immediate activation of screen saver

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.

ads

Posted 2010-09-03T13:48:56.877

Reputation: 41

I don't understand the point. If you just set it to require a login on reboot, isn't that equivalent behaviour? – ghoppe – 2010-09-03T15:10:39.413

@ghoppe logging in and locking the computer means you won't have to wait for the desktop environment to load. – Stephen Jennings – 2010-09-03T15:48:07.560

Another (bit more expensive) solution: buy an SSD. – jsejcksn – 2011-06-17T02:31:08.693

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. – None – 2010-09-03T17:31:29.730

Answers

4

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

defaults write /Library/Preferences/com.apple.loginwindow autoLoginUserScreenLocked -bool true

Gannet

Posted 2010-09-03T13:48:56.877

Reputation: 141

This doesn't seem to persist beyond one reboot on El Capitan... – XåpplI'-I0llwlg'I - – 2016-05-11T08:27:45.767

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 – 2016-05-11T23:34:07.693

Can you link to documentation on the developer site for this? Where did you find this? – jsejcksn – 2011-06-17T02:32:03.090

Which versions of OS X support this plist key that you know of. I'm going to look more into this. – jsejcksn – 2011-06-17T03:59:27.757

Works on 10.6. Does NOT appear to work on 10.5. If you find out anything else, let me know. – Gannet – 2011-06-18T10:51:35.313

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.

peelman

Posted 2010-09-03T13:48:56.877

Reputation: 4 580