Lock Screen and Sleep Display with Quicksilver

Looking for a quick way to lock your screen and put the display to sleep on Mac OS X using Quicksilver?

  1. Download Sleep Display.
  2. Extract the zip file and move SleepDisplay to your Applications folder.
  3. Run the SleepDisplay application at least once.
  4. Fire up Script Editor and enter the following code:

    do shell script "/System/Library/CoreServices/Menu\\ Extras/User.menu/Contents/Resources/CGSession -suspend"

    launch application "SleepDisplay"

  5. Save this script to a location cataloged by Quicksilver.
  6. Create a HotKey Trigger in Quicksilver to run the script. I use command-control-shift-S as my keystroke combination.

I’m running Mac OS 10.5.1 on an iMac and this works great!

8 Comments

  1. Posted December 18, 2007 at 7:16 pm | Permalink | Reply

    can it run on Linux such as SUSE linux?

  2. Posted December 18, 2007 at 7:46 pm | Permalink | Reply

    No, this is an AppleScript.

  3. kaz
    Posted January 8, 2008 at 9:06 am | Permalink | Reply

    It crashes my MacBook running 10.5.1. When I try to wake up, I got a login window, I log in, but then nothing. The login window disappears, and the “cosmos” picture of Leopard stays, using the whole screen. No menu bar, no desktop, no desktop picture, no nothing.

    Shortcuts works (I tried option-command-eject and the quicksilver trigger). And my cursor is visible and I can move it. But that’s it. I had to force shutdown…

  4. Posted January 8, 2008 at 12:37 pm | Permalink | Reply

    Mine seems to have stopped working too. I wonder if a recent update did something.

  5. ads
    Posted October 10, 2008 at 4:26 am | Permalink | Reply

    easier way, create a trigger with this command in text mode and “open” it.

    /System/Library/Frameworks/ScreenSaver.framework/Resources/ScreenSaverEngine.app

    http://leafraker.com/2007/09/14/start-the-screen-saver-with-quicksilver/

  6. tom
    Posted December 15, 2008 at 4:07 pm | Permalink | Reply

    even easier way – use the keyboard shortcut ctrl-shift-eject

  7. Posted December 15, 2008 at 4:08 pm | Permalink | Reply

    @tom That doesn’t Lock the screen.

  8. leon
    Posted July 10, 2009 at 5:47 am | Permalink | Reply

    This doesn’t work for me. My iMac is to fast or something, because it runs SleepDisplay at the same time as the suspend action. The result is that it won’t go to sleep. You should use the following script instead.

    do shell script “/System/Library/CoreServices/Menu\\ Extras/User.menu/Contents/Resources/CGSession -suspend”

    delay 2

    launch application “SleepDisplay”

    Now there is a delay of 2 seconds between the suspend action and running SleepDisplay.

    It works like a charm for me

Post a Comment

Your email is never shared. Required fields are marked *

*
*