Lock Screen Service
- Launch Automator from your Applications folder.
- Select “Service” as the document type.
- Select “Utilities” from the list on the left, then double-click “Run Shell Script” in the next column.
- On the top-right side of the screen, adjust the drop-down menus so the statement reads: “Service receives [no input] in [any application]“
- Copy the following command into the large text box that appears:
/System/Library/CoreServices/"Menu Extras"/User.menu/Contents/Resources/CGSession -suspend
6. Go to File > Save and name your service “Lock Screen”. Once saved, you can now quit Automator.
Lock Screen Keyboard Shortcut
- Open System Preferences and go to the Keyboard pane.
- Next, select the “Keyboard Shortcuts” tab. From the list on the left, select “Application Shortcuts”. Click on the plus (+) button below to add your new shortcut.
- In the dialog box leave “All Applications” selected in the first menu. Enter “Lock Screen” as the Menu Title. This has to be exactly the same name you entered when saving the service in Automator. Finally, enter your keyboard shortcut. You need to choose a combination of keys - Command+Shift+L is one that isn’t used for anything else so it’s a good choice.
Now when you press your keyboard shortcut (Command+Shift+L), the Mac login screen will immediately be displayed. You’re actually still logged in and anything that is working in the background will continue (like a large download). No one will be able to access your screen until you enter your password. When you do, everything on your desktop will be there just as you left it.
If you like this tip, you'll find lots more on my Facebook Page. Every morning there is another operating system tip, not just for Macs, but Windows as well.