For various reasons, I have trained myself to lock my computer's screen as soon as I vacate my seat every single time. This may seem annoying to some, but once you get used to it it becomes second nature. The reason I do this is to prevent the chance of a malicious coworker (or "guest") to steal my credentials at work.

However, Mac OS X has traditionally not made this simple. As far as I know, the only easy way to manually launch the screensaver was (and still is) to define a hot corner to put the display to sleep. Frankly, I don't want a hot corner action for this, if only because I already have assigned other actions to every corner of my screen. However, an icon in the dock would be very convenient... and this post teaches you the non-obvious way to achieve it.

  1. Go to the Finder.

  2. Select Go from the main menu and then Go to folder....

  3. Enter this path /System/Library/Frameworks/Screensaver.framework/Versions/Current/Resources and click Go.

  4. Locate the ScreenSaverEngine item.

  5. Drag it to the dock to create a direct access link.

  6. Voila. You now have an icon in your dock to immediately start your screensaver and lock the screen.

Comments from the original Blogger-hosted post: