Filed under: Software, Mac 101
Mac 101: Locking your Mac with a hotkey, like you can with Windows
One of the things that confused me the most when I switched to the Mac platform was the fact that there's no built-in way to lock the computer manually with a hotkey when walking away from it. This is something that was drilled into me from working in an office full of pranksters where leaving your computer unlocked was virtually a guarantee that you would be hosting a party for all of your co-workers that coming weekend.
It turns out that this is an oversight in Mac OS X, and a 3rd party utility is required to be able to lock your computer with a hotkey. For a simple solution I would suggest installing a very basic preferences pane called LockTight.
LockTight does exactly what you're looking for: assign a specific hotkey that when pressed will lock your Mac, requiring a password to unlock it if you have it configured to require a password to wake from sleep or screen saver (which you should).
Update: Reader Chad reminds us that if you actually want your machine to go to sleep with a keystroke (as opposed to simply locking the screen) you can use the Option-Cmd-Eject key combo.
[via Lifehacker]

![TUAW [Cafepress]](http://www.blogsmithmedia.com/www.tuaw.com/media/tuaw-cafepress-promo.png)


Reader Comments (Page 1 of 4)
John Dawson said 9:08AM on 6-19-2009
There is no hotkey but you can go to your keychain and keychane references. Check the show status in menu bar button in this screen. You'll have a little lock at the top of your screen and there is an option here to lock screen. It will do something similar.
Reply
Mem said 9:14AM on 6-19-2009
Or.. just set your screensaver to come on with a hot corner, and then require password to wake up from sleep or screensaver in security
Alex said 9:25AM on 6-19-2009
I just use Expose and set one of my corners to screen saver. When I get back to my Mac just type in my password and there you have it.
Funke, Tobias Dr. said 10:26AM on 6-19-2009
You can also add the screensaver app (located in /System/Library/Frameworks/ScreenSaver.framework/Versions/A/Resources) to the dock, and click on that whenever you need to.
This is the approach I used to use when I first came from a PC to Mac, I've since set the top right corner as activate screensaver, as I've found that to be the more convenient of these two options.
Dan S. said 10:59AM on 6-19-2009
Locking via the screensaver is not very secure -- there are easy ways around it.
If you have 10.3 or later, you should use Fast User Switching to lock the machine.
1. Enable 'Fast User Switching' in the "Accounts" Preference Pane
2. Choose "Login Window..." from the FUS menu when you walk away from your machine.
brian said 12:28PM on 6-19-2009
"Locking via the screensaver is not very secure -- there are easy ways around it."
Such as?
Damien K. said 9:16AM on 6-19-2009
I use MacLoc right now to keep my program running while I step away from the computer. It's a small application, justdrop it in your dock and a simple click does it. Does this app you are mentioning here keep my programs running when I use the hotkey or does it just log me out?
Reply
Federico said 9:13AM on 6-19-2009
I've had the same problem when i switched from Win to Mac. I solved it by enabling the simultaneous users option and leaving the posibility to change them on the fly in the menu bar, (even with just 1 user in my mac, it doesn't matter). That way, by just clicking my name on the top bar and selecting one option, i'm able to lock the computer.
No hotkey to do that that i'm aware of, but hey... it works.
Reply
dagaz said 6:45PM on 6-19-2009
I've used Butler to take this a step further - I have set up a hotkey that takes me straight to the login window without logging me out.
Mulder said 9:18AM on 6-19-2009
I also just use a hot corner to engage my screen saver and when the keyboard or mouse is used the screen saver goes away and a password is needed to get back in.
Reply
Joshua Meadows said 9:15AM on 6-19-2009
Off topic, but as a Windows user coming to OSX for the second time (I had one of those clamshells years ago) I find that a lot of things are oversights in OSX that require a third party utility to rectify.
No way native in OSX to turn off the startup BIIING if you don't want to let everyone know when your computer turns on, but thankfully a third party tool fixes that.
No way to keep the laptop from shutting off when you close the lid if you want to (even though given that there's a clamshell mode for external devices, it's obviously supported) but you can with a third party tool.
No way to have sound play continuously over your speakers through the audio-in jack unless you're recording (like when I have two computers and want the sound from the secondary one to pipe through the main machine's speakers) but a third party tool takes care of that as well.
I can really go on and on; I suppose I should be thankful that these third party modifications exist, but it gets tiring having to track down so many little hacks to do System Preferences-level modifications that I'm used to on Windows.
Reply
antiorario said 9:21AM on 6-19-2009
You can turn off the startup chime by muting the computer before shutdown. Simple as that.
Joshua Meadows said 9:24AM on 6-19-2009
I shouldn't have to remember to mute my computer every time I reboot to turn off a cosmetic sound that serves no function to begin with; and every PC I've ever used with a similar POST notification would disable and play through the headphone jack if it was plugged in. The OSX startup chime always passes through the speakers.
You can't say that remembering to mute audio every single time I restart the machine is *easier* than a toggle in preferences turning it off entirely if that's what I want, can you?
antiorario said 9:25AM on 6-19-2009
Also, the reason why Mac laptops go to sleep when you close the lid is because they disperse heat through the keyboard. If the lid is closed and the computer is awake, the computer will overheat. And you really don't want that to happen. There is often a reason for something you can't do, it's not because Apple's engineers are lazy or mean ;-)
John Dawson said 9:26AM on 6-19-2009
Hey, which apps are you referring to?
Hobbes said 10:47AM on 6-19-2009
The sound is not only cosmetic, it tells you when the system is ready to accept input to select which boot option you want. After hearing the sound you can press a combination of keys to perform many different tasks, from booting up to a different volume to clearing your PRAM. It's a useful sound.
Most other things can be accomplished via terminal commands. Though some of them are not exposed directly in a UI app.
Joshua Meadows said 10:54AM on 6-19-2009
I just hold down the necessary keys when the screen flashes white; has never been an issue not having the audio cue.
honem said 2:56PM on 6-19-2009
"No way native in OSX to turn off the startup BIIING if you don't want to let everyone know when your computer turns on, but thankfully a third party tool fixes that."
Contrary to your thoughts the startup chime on a Mac does serve a purpose.
It's the Mac equivalent of a POST check.
It's run it's initial diagnostic tests and has found no hardware or fundamental software problems.
If all is ok it does the chime.
If the chime sounds "off key" or you can hear many different chords spaced out then something's off on your computer. In fact I think I can recall an Apple Service CD from years ago that had a .pdf file on it of all the various different sounds when something goes wrong and what they mean. Something on it was in the latest service manual for my 2 year old iMac so it's still used in Apple service centers today.
It's not meant to be something the average user just turns off.
Joshua Meadows said 3:16PM on 6-19-2009
That's really all well and good, but same as with the clamshell mode for shutting your laptop lid and leaving it running, if it wasn't meant to be turned off, it wouldn't disable when you mute your machine before restarting.
What's the rationalization for line-in not playing sound unless you're recording something? :P
Shawn said 6:41PM on 6-19-2009
Whaa!