Tell me more ×
Ask Different is a question and answer site for power users of Apple hardware and software. It's 100% free, no registration required.

On Windows you can hit the keys Windows+L to lock your computer if you step away.

I don't want to have to remember if sleep currently asks for a password, if there is a time out where my screen isn't locked during a short period. Even with Lion supporting resume of many apps, I don't want to log out.

I do want to be sure data is secure when stepping out for lunch or a smoke break.

share|improve this question

16 Answers

up vote 99 down vote accepted

+ctrl+ puts the display (only the display, not the whole computer) to sleep and will then prompt you for a password if you have enabled Require password [amount of time] after sleep or screen saver begins under System Preferences > Security.

If your Mac does not have an (eject) key, you can use control-shift- (power).

share|improve this answer
1  
I like it! I think this is the closest to what I was looking for. – longda Aug 18 '10 at 17:12
1  
I've tried the various methods listed here and on the net. Shift-Ctrl-Eject gets my vote for the easiest for people coming from Windows. – kbyrd Apr 14 '11 at 14:28
8  
What if you have a Mac without an optical drive and no eject button? i.e. MBA 2011 – cspray Aug 20 '11 at 17:05
This is wonderful, I had no idea this existed. – SoFLy Sep 21 '11 at 23:14
1  
@cspray - CTRL + SHIFT + POWER BUTTON – 1.21 gigawatts Jan 12 at 3:35
show 2 more comments

From my answer in Super User.

Using Keychain Access's Lock Screen menubar.

Activate it here, in Keychain Access.app's Preferences:

keychain preference

Then lock.

keychain menubar

share|improve this answer
8  
You can also create a Keyboard Shortcut for this in the Keyboard Preference Pane once the menu item is made available! – Chealion Aug 17 '10 at 21:10
Awesome, I'd never seen this before. – Scottie Aug 17 '10 at 21:10
1  
That's exactly how I do it. I am surprised that their isn't something like this "out of the box". – Bruce McLeod Aug 17 '10 at 22:39
This one looks pretty good... how do you setup the keyboard shortcut for it though? – longda Aug 18 '10 at 1:50
2  
@longda: Go to the Keyboard Preference Pane, and go to the Keyboard Shortcuts section. Add a new Application Shortcut with the menu name of Lock Screen. (macworld.com/article/49080/2006/01/lockscreen.html) – Chealion Aug 18 '10 at 15:01
show 4 more comments

Via the Expose system preferences panel you can set a "hot corner" of your monitor that activates your screen saver. Say you set the Bottom Left corner, as soon as you move your mouse there the screen saver will invoke. If you've set a password on it, bingo, done.

Yet another option is to enable Fast User Switching in the Login Options pane of the Accounts preferences panel. This puts a Users menu in the top right hand corner, from which you can quickly choose "Login Window...". This kicks you to the login screen, requiring a password to move away from, and also does not end your session/quit any running apps.

share|improve this answer
2  
This will piss off anyone who uses your computer that isn't used to that configuration. – Kendall Hopkins Sep 1 '10 at 1:12
This would be individually configurable between user accounts, though, I'm assuming. If you've got multiple users using the same user account, though, then yeah you'd have to take that into consideration for sure. – Scottie Sep 1 '10 at 11:50
1  
@KendallHopkins shouldn't anyone using your computer be in their own account? :-) – Josh Jan 6 '12 at 15:00

Logging out to the fast user switching screen

  • Add a shell alias or a keyboard shortcut for /System/Library/CoreServices/Menu\ Extras/User.menu/Contents/Resources/CGSession -suspend.
  • Enable the fast user switching menu from the Users & Groups preference pane, and then select Login Window… from the menu.
  • Use the lock action in Alfred.

Locking the screen

  • Check "Require password immediately after sleep or screen saver begins" in the Security & Privacy preference pane. You can then lock the computer manually by pressing control-shift-eject to turn off displays or option-command-eject to go to sleep.
  • Enable the Keychain menu extra in the preferences of Keychain Access, and then select Lock Screen from the menu.
share|improve this answer
I really like how this avoids the whole screensaver needing to enforce a password or a log out dialog popping up slowly to allow a cancel of a "log out" event. – bmike Sep 21 '11 at 16:46
@bmike I edited the answer to summarize other options (besides a shortcut for GCSession -suspend). – Lauri Ranta Sep 21 '11 at 20:16
Much appreciated. I hope you don't mind my edits and calling attention to this answer/question. (I hope you didn't feel compelled to make this into the combined answer - you're getting the bounty for the short/sweet answer once my 20 hour waiting period to award it expires.) Thanks! – bmike Sep 21 '11 at 20:23

With the track pad, you can configure gestures for locking your mac. I do it with a four finger swipe left. To confiugre this, you need a (free) tool like the BetterTouchTool.

share|improve this answer
In my opinion, that's actually the best answer ! – Cedric H. Sep 21 '11 at 21:51
1  
And it should be noted that this is not restricted to the trackpad: you can set a shortcut for your magic mouse, normal mouse, or more simply for the keyboard. You can even configure the apple remote ! – Cedric H. Sep 21 '11 at 21:53

Your Mac can ask your password after it wakes up if you set it to do so in the Preferences panel (Security). From there on, you can use ++ to put your Mac to sleep. So all you have to do is hit that and walk away.

share|improve this answer
2  
Note: This invokes sleep, which is not good if you're processing stuff in the background. – r00fus Sep 21 '10 at 23:08

If you enable screen locking within the screen saver pref pane you can put the computer to sleep and lock at the same time by pressing ++F12

share|improve this answer
1  
This isn't working for me... I have a screen saver setup and the required login when waking from a screen saver. Did I miss something? – longda Aug 18 '10 at 1:39

+++Q will perform a "quick logout."

Another option is to enable a password when waking from sleep or screen saver and adding a hot corner for one or the other. Then locking is as simple as tossing a mouse in a corner.

share|improve this answer
3  
That command actually quits all running programs and logs the user out, which is likely not the desired behavior. edit: in regards to Shift+Cmd+Opt+Q – Scottie Aug 17 '10 at 20:10
1  
@Scottie: Come on, give me more then a few seconds. – Josh K Aug 17 '10 at 20:10
1  
This will logout instead of locking. Although it will still require a password to return, you lose the session. – Jacob Gorban Aug 17 '10 at 20:10
1  
@Jacob: You're not reading "the other option" for this. – Josh K Aug 17 '10 at 20:12

Use a keyboard shortcut and use Automator to make a screen lock service. This will allow you to set any keyboard command you would like to lock or start a screen saver on your mac. As referenced below is a nice article on how to do the process.

Handy screen locking tips for Mac

... If mousing to part of the screen isn’t your thing, you can use the keyboard to lock the screen, but it takes Automator (or a third-party application, but Automator is the better bet if you’re using OS X 10.6). Launch Automator and create a new service.

Tell the new service that it receives “no input” (rather than the default of “text”). The default is also for “any application”, make sure to keep this set. Next, drag the Start Screen Saver action from the Utilities action group to the workflow. Finally, save the service and give it a name, such as Start Screensaver. Go back to Keyboard Shortcuts in the Keyboard section of System Preferences and look in the Services group. Scroll down to the General section and you will see the newly created Start Screensaver service is enabled. Click in the whitespace to the far right of this entry and a new entry box will appear. Type the keyboard shortcut, such as CTRL-OPT-L.

Exit System Preferences.

Mac keyboard preferences

You will now be able to hit CTRL-OPT-L and activate the screen saver in order to lock the screen. If you wish to return to the login window instead (you are still logged in, but the computer is locked) rather than activate the screensaver, change the Automator service to Run Shell Script instead of Start Screen Saver and have it run the following command:

/System/Library/CoreServices/Menu\ Extras/user.menu/Contents/Resources/CGSession -suspend

...

share|improve this answer
Best answer, hands down. – Dan Moulding Jun 5 '12 at 16:49

If you want to be able to remote control your Mac (with Synergy or something similar) even when it's locked, I'd recommend you to show the Keychain Status in the Menu Bar. You do that as follows:

  1. Launch the application Keychain Access
  2. Press ⌘, to open up the Preferences window
  3. Tick the Show Status in Menu Bar check box
  4. Click the newly appeared lock icon in the menu bar
  5. Click Lock Screen to lock the screen

This will lock the screen with a login window, but still make the Mac possible to remote control. If you don't need to remote control the Mac, MacLoc is a simple and effective solution.

share|improve this answer

The Lock Screen 2 app is a great little tool to make locking and unlocking much more adaptable. It is for sale on the app store priced below $5 lately.

The promo video is quite entertaining even though it doesn't promote the ease of assigning a custom key command to engage a screen lock.

share|improve this answer
You can use your trackpad to unlock. One problem. You can't set a password yet. – Diago Sep 22 '11 at 9:09

Deskshade does exactly what you are asking. It locks the screen displaying only a huge padlock sign so intruders know the screen is locked which prevents unnecessary attempts to use the machine whiles you are away. http://macrabbit.com/

share|improve this answer

Another program that can allow you to quickly lock your screen is Padlock. Note that the aforelinked Macworld review of Padlock also gives a comprehensive review of other solutions (many of which were discussed above) for locking your Mac.

share|improve this answer

SizzlingKeys is a little Preference Pane that mostly lets you configure iTunes keyboard shortcuts, but one of the "Extras" included lets you specify a shortcut to actually lock the computer and take you to the Fast User Switching screen, not just start the screensaver. I keep Lock configured as ++L but you can specify whatever you want.

SizzlingKeys has a paid upgrade, but the Lock shortcut is configurable using the free version.

share|improve this answer

FTW! A keyboard short cut to launch screen saver which you can configure with a password lock. All free. Follow the link for better explanation and screens. I have been using quicksilver to launch the screensaver which works nicely as well.

http://leafraker.com/2007/09/14/start-the-screen-saver-with-quicksilver/

The only thing left to do is to define a keyboard trigger. I’m using “Shift/Control/Command-L” as my trigger.

This key combination may sound a bit awkward at first, but I’m using “Shift/Control/Command” for all my Quicksilver trigger. The nice thing about this combination is that it rarely cause conflicts with other keyboard shortcuts, and once you are used to this combination it’s really not this bad. So in this case I combined it with the letter “L”, for “Lock”.

share|improve this answer

You guys should check out QuickLock to lock your Mac with. It locks with any desired keyboard shortcut, it's beautiful, and it's completely and totally customizable.

Best of all it's free.

Check it out here: www.quicklockapp.com

share|improve this answer
2  
If you are in any way affiliated with this app, please mention it in the answer. – patrix Oct 23 '12 at 3:31
1  
Promotion is okay, but you need to clearly state that you are affiliated. See our FAQs – daviesgeek Oct 24 '12 at 5:54
To me, this looks like advertising – myhd Oct 30 '12 at 14:56

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.