Lock Computer on Screensaver or Screen Sleep

I set this up and love it. Just in case I forget how I did it, I’m posting this 10.6 hint here. My shortcut is [Shift] + [Option] + [Command] + L.

When I step away from my Mac at work, I want a quick way to lock the screen, and hitting a hot-corner with the mouse is problematic for me. This hint details how to lock the screen from the keyboard by using Automator to build a Service in Snow Leopard.

First, check the General tab on the Security System Preferences panel to ensure that the Require password [some period] after sleep or screen saver begins box is checked.

Then, open Automator in the Applications folder, and select Service from the screen that appears. At the top of the new Service’s actions, in the Service receives drop-down, select no input from the options. Make sure that any application is selected in the second drop-down.

Add the Start Screensaver action (in the Utilities group of actions) to the Service by dragging it to the right. Save the Service (Automator does not ask you where to save it, just to name it). Next, open System Preferences and select the Keyboard preference pane. Select the Keyboard Shortcuts tab at the top, then the Services group on the left. The service you created should be near the bottom of the list of Services under the General disclosure triangle.

Double-click on the right side of the entry for the Service you created and assign a keyboard shortcut. This was a bit unintuitive, because the shortcut column is not distinctly visible, so it is not obvious that you can double-click in the assigned shortcut column to add a shortcut.

I had difficulty picking a keyboard shortcut that would work in 10.6.0. Command-L did not work for me, because it is assigned the Show All Preferences menu item in System Preferences. Control-L also did not work for me. Command-Shift-L did work once I reassigned the Search with Google Service a different shortcut.

Exit the keyboard preference pane to give it a try.

If you find yourself holding down the keyboard shortcut until the screen saver appears, and it disappears when you release the keys, you may want to decrease the time Snow Leopard waits before requiring a password in the Security system preference to immediately (or release the keys before the screen saver appears).

link: macosxhints.com – 10.6: Lock the screen via a keyboard shortcut