Become a MacRumors Supporter for $50/year with no ads, ability to filter front page stories, and private forums.

kalakov

macrumors member
Original poster
Apr 4, 2011
32
0
Guide – How to lock your Mac OS X
(This will not shutdown your computer or put it in sleep mode)

Step 1

Go to Applications –> Select Automator -> Select “Service” template and click Choose
2n733bq.jpg


Scroll down or type in search bar to find “Run shell script”. Drag it to right where it says “Drag actions or files here to build your workflow”
14o3neu.jpg


Now it will look something like this. Select the drop-down in front of “Service receives selected” and select “No input”.
nybtav.jpg


Now in the text box you can see “cat” written. Select “cat” and paste the following in its place:

exec /System/Library/CoreServices/"Menu Extras"/User.menu/Contents/Resources/CGSession -suspend

Select File from the menu bar and click save. Give it a name e.g. Lock Mac.
Now exit Automator.

Step 2

Go to system preference and select Keyboard and then Keyboard shortcuts
303k7qu.jpg


Select Services from the menu on the left side and then scroll down to “General” in the menu on the right side. You will find your service Lock Mac without any shortcut. Select a shortcut of your liking and you’re done. Remember to select a shortcut that isn’t already being used. (This is tricky but you’ll get the hang of it)
 
And now the easy way:

Applications -> Utilities -> Keychain Access -> Preferences -> Select "Show Status in Menu Bar".

Done. :p:D
 
Easier Still.....

Preferences - Users - Enable Switch Users

Then select your user name in the menubar and select LOGIN WINDOW every time you want to lock the desktop.

btw. this assumes you have a login password, as do all these suggestions!
 
question

none of the 2 ways above show a hotkey way. I've switched from windows to mac. any ideas on that??
 
Cmd-Alt-Eject sleeps my Mac... which is cool because I didn't know about that shortcut, but not the same as locking the computer IMO.
 
Register on MacRumors! This sidebar will go away, and you'll see fewer ads.