My Octopress Blog

A blogging framework for hackers.

How to Lock the Screen in Mac

    '/System/Library/CoreServices/Menu Extras/User.menu/Contents/Resources/CGSession' -suspend
  • use “Automator” create a service, then set the input as “no input”.
  • drag “Run shell script” to the editor in right side, then

      '/System/Library/CoreServices/Menu Extras/User.menu/Contents/Resources/CGSession' -suspend
    
  • save the service as “lockscreen”

  • set the shortcut key for the service in keyboard->shortcut keys