Mac users tend to be a very proud lot and often for good reason. Apple is currently riding high and receiving huge amounts of press coverage over the last few years. Overall, the hardware and software and just miles above anything else out there. Yet despite being an easy target, Microsoft Windows does do a lot of things right – some of which have yet to find their way into the Mac OS. This post is about one such area.

When I’m away from the studio, I’m almost always working on my MacBook Pro and yesterday I found myself in an situation where I needed to leave my desk and was working on some code that really needed to remain private while I was away. For years Windows has offered the ability to set your screensaver so that it requires a valid user password in order to deactivate it. I would have sworn that I had seen that same feature in a previous version of OSX but in a quick glance, I wasn’t able to locate it yesterday.

I’m sure there are many ways to accomplish this but I was in a situation where I had just a minute or two to figure out a way to secure my screen while I was away (and the obvious solution of taking your laptop with you wasn’t a valid option in this case) but a quick search once again taught me something new about the Mac that I wanted to share with you.

To easily secure your screen, open the Keychain Access application (located in your Applications / Utilities) and go into it’s preferences, General tab. Check the first checkbox which says Show Status in Menu Bar which puts a small padlock icon in your menu bar. Now, anytime you want to lock up your Mac to keep it safe from prying eyes, just click on that padlock and choose Lock Screen which will bring up your screen-saver only now, requires your user password in order to deactivate it.

It works great and I just wish this wasn’t buried down in the Keychain Access application so more people could benefit from it. Is there a default way to lock your screensaver other than this? By all means, let me know if you are aware of any by posting your comments to this entry. If you want to some learn other strategies to secure up your Mac, check out this piece written earlier this year by long time Mac expert Rob Griffiths on behalf of MacWorld.

28 Responses to “Leaving Your Mac Unattended? Here’s A Quick Tip To Lock It Up”

  1. Bubbinator says:

    It’s the first option under security. You could also have found it by typing “screen saver” or “password” in the search field in the System Preferences.

  2. Doc says:

    There is a “Require password when waking from sleep or screen saver” in the security pref pane- right where it belongs (ie security) and by setting a corner to activate the screen saver you eliminate the need for a mouse click in the menu- much more efficient for me.

  3. Guydb says:

    Just go to the security preference control panel and click the “Require password to wake computer from sleep or screen saver” then whenever your computer goes to sleep or you put it to sleep or the screensaver comes on it will require a password to log back in.

  4. CGYH says:

    There’s a much simpler way to do all of this. Go to the menu item to the left of the Spotlight icon. That would be your user name. Select that and then go to “Login Window…” That will immediately take you to the login window with you still logged in. Simple, right?
    Yes indeed

  5. Jeffsters says:

    Ok…besides the fact this has been a part of Key Chain since 10.1..it’s a great tool. The rest of you don’t “get it”. This locks the screen. It does not require you to set the silly sleep corners that drive me up a wall, ESPECIALLY if you have “require password” set. You don’t want o put he computer to sleep…at least I don’t so that’s out. Finally, I don’t care to have Fast User switching taking up all that menu bar real estate just to quickly lock the screen. This is one feature i wish Apple would steal from Windows and do it better. I like at work being able to C-A-D and lock my machine. It’s wacky but it does become second nature when you walk away. Apple could, and should, do much better.

    BTW! This hint comes with a caution…when your keychain is reset or otherwise altered often this setting is lost and the little lock will disappear. You’ll need to go back into Key Chain and set the preference.

    As I said…I use this all the time. Not sure why there is such objection to it. Apple provides it and it’s just another way to accomplish our common goal. Like the author, this just works better for me than the other suggestions!

  6. ispiderman says:

    Much thanks to CGYH’s suggestion. I was not aware this was available. I never liked the feature Requiring password when waking from sleep or screen saver. So I turned it off and have always wondered how to secure my mac book pro when I step away for a moment. Way cool.

  7. Joshua says:

    Jeff,

    I don’t think anyone was suggesting that the screen saver method was superior to your tip, it’s just that in the article you mentioned that you could not find an option to do so and windows has it, but Mac OS X still does have it and people were pointing that out. Before writing an article, it’s best to do all the research on what you are about to claim otherwise you will prompt comments like these.

    Just like your recent comment of fast user switching taking up all the screen real estate. If you would have actually checked out the option, you can instead show an icon instead of a name, which takes up exactly the same amount of space as the keychain item.

    The only downside to the keychain item is that Microsoft often adds proprietary keychains that are incredibly long in name. So the menu will often take up 1/4 of the screen and have ugly “microsoft_intermediate_certificates” all over it, etc…

    The FUS method prevents this and looks a little nicer. Essentially the exact same thing, but maybe a little more elegant. You could even replace the “head” icon with a “lock” icon if you wanted and then you’d have the best of both worlds I guess.

  8. autowireless says:

    I got Clicker automatically starting my screensaver (password protected as explaned above) and putting my iChat status to away when I / my mobile (paired via bluetooth) goes out of range of my Mac.

  9. onerob says:

    I do wish that you could choose to enter a password when waking from sleep but not the screensaver.

  10. Justin says:

    the EASIEST way to do this is setup a hot corner in exposé to Enable Screen Saver and put a password protect on it. All I do is direct my mouse to the bottom right corner of the screen and leave… I don’t see how it could be ANY simpler.

    Justin

  11. Samuel Herschbein says:

    For those whose menu bar is too cramped to add fast user switching and/or Keychain status:

    This 1 line AppleScript will bring up the login window:
    do shell script “/System/Library/CoreServices/Menu\\ Extras/User.menu/Contents/Resources/CGSession -suspend”

    This AppleScript will toggle the “Require password to wake this computer from sleep or screen saver”. It does not know which state (checked/unchecked) it is currently in…

    tell application “System Preferences”
    activate
    end tell
    tell application “System Events”
    tell process “System Preferences”
    tell menu bar 1
    tell menu bar item “View”
    tell menu “View”
    click menu item “Security”
    end tell
    end tell
    end tell
    end tell
    end tell

    delay 1

    tell application “System Events”
    tell process “System Preferences”
    tell window “Security”
    tell checkbox “Require password to wake this computer from sleep or screen saver”
    click
    end tell
    end tell

    end tell
    end tell

    tell application “System Preferences”
    close window “Security”
    end tell

  12. tunaranch says:

    You can also set up a quicksilver trigger to start your screensaver. I have mine set to hold apple + esc for three seconds, but you could set it to anything you wanted.

  13. Brajeshwar says:

    Well, my top-left corner is the hot-spot to activate Screensaver (customized) and thus I just swiiiisssshhh to the top-left corner and my screen is locked.

  14. Ryan Gray says:

    I use the FUS method since I use FUS already, but I also use the free Sizzling Keys for iTunes by Yellow Mug, which as one of its little extras can assign a keystroke of your choosing to “Lock computer”. This really just invokes the login screen of FUS. So, I just press command+F2, and I’m good.

  15. PMH says:

    I’m with Doc on this one. Security pref pane. Require password to wake up from sleep or screensaver. Set a hot corner in the screensaver pref pane and you’re good to go. No clicks required, much more convenient.

  16. MikeZuluSierra says:

    There is a freeware third party system preference pane called LockTight. By installing it, the user can configure a keystroke combination (Hot Key) by which the screensaver can be started. If the screensaver is configured to require password for deactivation, by pushing the HotKey of LockTight, the screen will be locked.

    It is so simple and comfortable to use this method, that I wonder why Apple doesn’t integrate such a functionality in their OS. I hope some of their later operating systems will contain a feature like this.

    LockTight can be downloaded from here:
    http://mac.pieters.cx/

    Exact URL of LockTight’s disk image:
    http://mac.pieters.cx/Software.....0.1.dmg.gz

    A nice article about locking screen in Mac OS X:
    http://mac.byu.edu/2004/09/14/.....keystroke/

  17. whooda says:

    Don’t forget, you can use the System Prefs Keyboard Pane to assign a Keyboard Shorcut to a menu item (Ctrl+L for “Lock” perhaps). Or, use the AppleScrip described above, giving it a distinct name, so that a simple entry of a few keys to Spotlight will bring it up and hit Cmd+Enter.

  18. There are a number of ways to quickly lock your computer in OS X (as evident by all the great comments so far), but my preferred way is with a simple Dashboard widget called Locker.

    http://bluecouch.com/locker/

    Hit F12 (or whatever you use to activate Dashboard), double click on the Locker widget, and you’re at the login screen. Highly simple, very quick, and free.

  19. Sverre says:

    To avoid the annoyance of accidentally locking your screen, you can set a modifier key (or several) for the screen corner. Just hold down the modifier(s) while choosing the Start Screen Saver action in the Hot Corners dialog.

  20. Dan says:

    I just invoke Quicksilver and type “FL” for “Fast Logout” which brings up the Fast User Switching login/password dialogue without logging you out. (This requires that Fast User Switching be turned on and the Extra Scripts Quicksilver plug-in be activated.)

    If that proves too cumbersome, you could set it up as a Quicksilver trigger as well and enjoy that sweet key-command magic.

    Piece of cake once the muscle memory kicks in.

  21. James Gowan says:

    I’m with Powell on this one. PMH said: “Set a hot corner in the screensaver pref pane and you’re good to go. No clicks required, much more convenient.” I dissagree. I have dual monitors and trying to hit the hot corner to start a screen saver immediately is quite tricky, as the mouse wants to just keep going to the other monitor. The FUS is an ok method, but you have the screen set on my thing (burn-in,… is that still a problem for some?)

    Anyway — I’ve got the lock up there on the menu bar and I’m a happy camper. Thanks, Jeff.

  22. James Gowan says:

    Patrick, LOCKER is pretty of cool, but if you’re iChat connected, it logs you out of that, whereas a screensaver just runs with everything going in the background. You don’t have to reconnect anything when you want to get back in. Still with Powell on this.

  23. Cameron says:

    Jeff, I saw this back a while ago. Found it much better than the ‘hot corner’ approach, however, still felt it lacking. Thought it could be more. So, in a shameless bit of self-promotion … enter the Screen Saver Menu. This too is a menu-based approach for launching the screen saver. Simple and out of the way … has an option to “lock” the screen which provides a one-time lock and returns your screen saver preferences once unlocked.

    I have received some great ideas from users and hope to further expand this concept. Designed to fill my needs and desires, I have found it extremely helpful in my work environment.

    Just another option.

  24. John says:

    Locktight allows you to set a hotkey so you can bring up your “locked” screensaver at the touch of a configurable hotkey. I set mine to command + option + . so I can easily lock it every time I walk away from my keyboard: http://www.fellinahole.com/sys.....r-OSX.html

  25. one1step1 says:

    The screensaver ‘wake from sleep password’ is flawed. If you go to that preference pane, anyone can turn it off/on.
    Go to the security pane and you can have the padlock locked, and STILL enable disable that option. It’s flawed!

    So, if you use the lock screen method, it is ostensibly more secure. Also, if you are working in your office, and talk on the phone etc.. and the screen saver comes on, it’s a hassle to enter the password every time. With this, when you go away, hit lock screen and then you can enter a password when you come back.

  26. Jeppe Utzon says:

    Although I realize it isn’t the same as locking the screen since no processes are running, I’d urge everyone to make the computer sleep instead of just locking the screen whenever it’s possible, as it would save a lot of electricity overall. :)

  27. Unless your computer is in a physically secure location, you also should disable the ability of Mac OS X to automatically log in as a particular user.

  28. Andrew says:

    i dont know if anyone will still read this, but here goes nothing:

    i use the lock screen method.. however, no screensaver will come on while osx sits at the login screen. is there any way around this. I like the lock screen method for the reason one1step1 said, “if you are working in your office, and talk on the phone etc.. and the screen saver comes on, it’s a hassle to enter the password every time.” any ideas?