Locking your screen in sleep mode?

in Genius Bar edited January 2014
Being used to Win 2k you can lock your screen when your away from you system. Is there anything like that for OS X?

Also can you put your system to sleep with the screen locked so that you have to type in a password to access it when you wake it up?



  • Reply 1 of 9
    gardnerjgardnerj Posts: 167member
    system prefs/screen effects go into the hot corners tab. set a hot corner and come out. put your mouse pointer into the selected corner and hey presto your screen saver comes on. so long as it is password protected you'll be fine.

    sleeping in this state is fine btw.
  • Reply 2 of 9
    scott_rscott_r Posts: 98member
    Thanks gardnerj!

    Not as elegant as I wanted it to be, but it works! Just hit sleep, then quickly run the mouse to the targeted screen corner, and when it comes out of sleep, password is required.

    Just wish they would add it as an option along with sleep, or a lock screen with "sleep" button it. All other UNIX's I've worked with have this feature as a right click on the desktop. Maybe Panther has this. . . .
  • Reply 3 of 9
    You should get a laptop. You can start the screen saver, and then simply close the screen.
  • Reply 4 of 9
    neutrino23neutrino23 Posts: 1,546member
    You can set the sleep time to just a few minutes then activate the screen saver with password protection. After a short time the system will sleep by itself.

    Note that there was a thread around here somewhere that you could defeat the password protection somehow.
  • Reply 5 of 9
    1337_5l4xx0r1337_5l4xx0r Posts: 1,558member
    ...Hopefully not by doing something daftly predictable as Command-Option-Escape?

    Apple is apparently working on a patch for said security workaround.
  • Reply 6 of 9
    paulpaul Posts: 5,278member
    nahh... you have to input a very large number of characters in the password box and the screen saver gets confused about such a large word and crashes... bringing you out of the screen saver...

    but it takes a little while to get enough characters... like 5 min of holding down a key....
  • Reply 7 of 9
    baumanbauman Posts: 1,248member
    Here is a much more elegant solution that was just posted at www.macosxhints.com. It does, however require the use of shell scripts.


    The goal: lock the screen with standard Screen Effects automatically, right before switching the Mac to sleep state. This is a standard security precaution, and I don't know why it's not implemented in Jaguar, but here is a workaround.

    There is nice free daemon called sleepwatcher; it can run some scripts on sleep or wake events. Install it and call /System -> Library -> Frameworks ->ScreenSaver.framework ->Resources -> ScreenSaverEngine.app -> Contents -> MacOS -> ScreenSaverEngine from its "sleep" script. Simple, but there is problem. If you already have ScreenSaverEngine running, a second instance will screw both of them (not deadly, but unpleasant). To prevent this, it should be called like this:



    SCRS=`ps xcopid,command|grep ScreenSaverEng|cut -b1-5`

    if [ -z "$SCRS" ]; then

    # Next line is shown on TWO LINES; enter as one

    # without any added spaces...


    ScreenSaverEngine.app/Contents/MacOS/ScreenSaverEngine &

    sleep 3


    That's it. Screen Effects should be configured to lock the screen, of course.

    [robg adds: I haven't tested this one, but I took a look at the sleepwatcher package. I think (hopefully someone can confirm) that you make this work by creating the above script and saving it as .sleep in your home directory (remember to make it executable). sleepwatcher then checks for the .sleep file before the system goes to sleep and locks your screen. I also can't confirm that you're then asked for the password on wake -- anyone?]

  • Reply 8 of 9
    baumanbauman Posts: 1,248member

    Originally posted by bauman

    Here is a much more elegant solution that was just posted at www.macosxhints.com. It does, however require the use of shell scripts.

    Heh, I was just checking around that site a little more, and someone put in the comments section this link: http://www.ragingmenace.com/software...ght/index.html

    Apparently works the way the first hack did, but this already has the shell script as a part of the program. It seems like it's even more elegant. And it prevents the 'dueling screensavers' problem.
  • Reply 9 of 9
    scott_rscott_r Posts: 98member
    Thanks everyone for all the good info! I've downloaded "SleepTight" and going to give it a try. I've also found a neat utility that I can wake my Mac from my PC.

    I'm using OSXvnc to control my iMac DV from my PC. It's great to Fire up my PC and then turn on the Mac in the other room with out having to go in there. Get the best of both worlds. I'm still trying to find software that will replace the ones I have on the PC, and so far there are none that come close. I found many, but they're missing lots of features that PC counter parts have and they cost more. They're might be some programs out there and just don't know they exist yet. I'll post another thread asking for advice about that.

    Anyway I'm sure there are lots of "Tweeners" out there that use both systems and may find this useful.

    The program for Wake on Land is at:


    Download the Win 32 version and put the wol.exe in your Windows/system32 directory then in the run prompt put:

    wol 00:00:00:00:00 <enter>

    The zeros are your netcard's mac address (you get this info from the Apple system profiler program) for you either net card. This only works when the Mac is in sleep mode, not off.

    HTH. . . . Scott
Sign In or Register to comment.