I got tired of clicking on "Login Windows..." on my mac when I want to lock my logged user account. I discovered a solution to create a easy shortcut command to solve this problem. If you also want to give it a try, you can :)
- Start Applications » Automator
- Select "Service" for the template of the new Automator workflow
- In the top of the right pane, select "Service receives no input in any application"
- Drag action "Run Shell Script" from the left pane into the workflow on the right pane
- Leave Shell at its default "/bin/bash", and replace the default command
cat
with the following, without any line breaks:/System/Library/CoreServices/Menu\ Extras/User.menu/Contents/Resources/CGSession -suspend - Optional: click the Run button to test
- Hit Cmd-S to save. The name you type will be the name in the Services menu. The workflow will be saved in
~/Library/Services
.
To assign a keyboard shortcut, in 10.6:
- Open System Preferences » Keyboard » pane Keyboard Shortcuts
- Select "Services" in the left pane
- Scroll down to General in the right pane
- Double-click to the right of the Automator workflow you just created
- Press the keys you want to use, and switch panes to ensure the new shortcut is saved.
For details please click here.