Submit Hint Search The Forums LinksStatsPollsHeadlinesRSS
14,000 hints and counting!

How to lock the screen when using a screensaver desktop Desktop
One rather nasty consequence of running a screensaver as your desktop picture (see this hint) is that you can no longer use the screensaver to lock out your system. There's a relatively simple way to get around this. Navigate in the Finder to /System -> Library -> Frameworks -> ScreenSaver.framework -> Versions -> A -> Resources, and then duplicate ScreenSaverEngine.app. Move the copy wherever you want (I keep mine in /Applications/Utilites). If you'd like, you can rename it as well. Put it in your Dock or assign it a keyboard shortcut with Youpi Key. When you want to lock your screen, just activate your duplicated engine.

Depending on how you set up the screensaverengine to put the screen saver on your desktop, you should be able to configure the "real" screensaver using the Screen Effects prefPane. Otherwise, the lockout screensaver will be the same one that you use as your desktop background.
    •    
  • Currently 3.00 / 5
  • 1
  • 2
  • 3
  • 4
  • 5
  (2 votes cast)
 
[11,343 views]  

How to lock the screen when using a screensaver desktop | 13 comments | Create New Account
Click here to return to the 'How to lock the screen when using a screensaver desktop' hint
The following comments are owned by whoever posted them. This site is not responsible for what they say.
Not sure I follow you...
Authored by: jecwobble on Jul 09, '03 10:49:39AM

I have been using the screensaver as my desktop background for several months. I also have the screensaver set to prompt for a password when it's running regular, and it works just as it should.

The only thing I have to remember is to turn off the desktop background saver before inserting CDs, otherwise they won't mount. Once mounted, I simply restart the background saver and continue.



[ Reply to This | # ]
How to lock the screen when using a screensaver desktop
Authored by: DC Watts on Jul 09, '03 12:01:04PM

Although now well publicized, I suppose it bears mentioning that there is an easily exploitable hole in ScreenSaver as documented at http://www.securiteam.com/unixfocus/5JP051PAKI.html wherein an attacker crashes the app by entering an extremely long string into the password field. A fix is reputedly in the works. Not that locking ScreenSaver was ever regarded as "tight" security anyway.



[ Reply to This | # ]
Unable to Crash Screensaver
Authored by: jasonxz on Jul 09, '03 11:50:55PM

According to the site, a password between 1280 and 1380 characters will crash the screensaver. I tried it (under 10.2.6) a few times and it didn't crash. Anyone else get this "bug" to work?



[ Reply to This | # ]
Unable to Crash Screensaver
Authored by: sweetsdream on Jul 10, '03 12:44:29AM

Same here. I just tested it on my iBook and it did nothing but ask me for the password again. Running 10.2.6

---
Cheers,

Sweetsdream



[ Reply to This | # ]
Unable to Crash Screensaver
Authored by: DC Watts on Jul 10, '03 08:47:52AM

A number of commenters on MacSlash running 10.2.6 report duplicating this issue with a larger number of characters. Truth or troll? I do not know. Even if true, this does not alter the way I use ScreenSaver's lock feature. If away from the machine for a short period of time in a friendly location I will activate this feature to discourage prying eyes. Greater threats require greater measures.



[ Reply to This | # ]
Unable to Crash Screensaver
Authored by: vajonez on Jul 10, '03 08:09:07PM

It's true. Here is a repeatable case:

1. Activate password protected screen saver.
2. type "1234567890" into the password field (do not press enter/return).
3. while pressing the control key, type "akyyyyy" (do not press enter/return).
4. repeat step 3 three (or more) times.
5. press either the return or enter key. or click the OK button.

ctrl-a is the emacs key binding for "go to the beginning of the line"
ctrl-k is the emacs key binding for "delete everything from the cursor to the end of the line and put it in a buffer"
ctrl-y is the emacs key binding for paste the contents of the buffer



[ Reply to This | # ]
Unable to Crash Screensaver
Authored by: phti on Jun 03, '04 05:40:17AM

done that, but no crash...



[ Reply to This | # ]
How to lock the screen when using a screensaver desktop BETTER!
Authored by: sweetsdream on Jul 09, '03 12:03:05PM

An easier way to do this is to open 'Applications/Utilities/Keychain Access' click the view menu then select "Show status in menu." Once you do this you will have a lock icon in you menu. You can then click on the lock and select lock screen.

---
Cheers,

Sweetsdream



[ Reply to This | # ]
How to lock the screen when using a screensaver desktop BETTER!
Authored by: wyvern on Jul 09, '03 12:40:57PM

This still suffers from the security vulnerability, though. What we really need is a patch from apple :/



[ Reply to This | # ]
How to lock the screen when using a screensaver desktop BETTER!
Authored by: sweetsdream on Jul 10, '03 12:48:35AM

I have not been able to reproduce this bug I my iBook running 10.2.6. Nothing happens other than the password being rejected. I think that bug may be an isolated problem or Apple fixed the problem on my version.

---
Cheers,

Sweetsdream



[ Reply to This | # ]
Bogus hint
Authored by: Basilisk on Jul 09, '03 12:13:46PM

Folks, don't do this. This technique is only necessary because of the mistaken belief that launching ScreenSaverEngine.app is the correct way to lock your system.

Yes, I'm aware that this method is popular, and is even covered in many hints on this site, but it is wrong, and doesn't do what people think. Launching the screensaver engine this way is not the same method used by the system itself. Because of this, when you launch the ScreenSaverEngine.app once (for desktop background) you can't launch it again from Youpi Key or elsewhere. This is because the app is already open and MacOS doesn't let you double-launch an app.

As for why not to start the screensaver password this way, try the following test (be careful, this leads to a problem documented below):

1. Set you system screensaver start time to 5 minutes.
2. Launch ScreenSaverEngine.app
3. Wait 5 minutes.

After the 5 minutes have passed the windowmanager will start the screensaver a second time, leading to flickering screensaver of doom (both savers fight to be front and recieve keystrokes during password entry). With some patience you can usually get one to take a password and eventually quit, or just force restart the machine.

Properly launching the screensaver requires the use of an undocumented API in ScreenSaver.framework, which uses the windowmanager to launch the screensaver. This works correctly, and the screensaver won't double launch (no flicker of doom) and doesn't conflict with the desktop screensaver.

How do I know all this? Becuase I had a similar problem and had to figure out how Apple's keychain menu extra does this properly (never double-launched, no conflcit with desktop background). I've since written an app to do this properly, look for SleepTight to appear on VersionTracker in the next couple of days.

Bas



[ Reply to This | # ]
How to lock the screen when using a screensaver desktop
Authored by: NetFu on Jul 10, '03 02:11:57PM

This is kind of weird, because I've never had any problem with this on my iMac 17" or PowerBook G4 12". I run the screensaver in the background and the screensaver starts/stops in the foreground on its own without any problems. I run the screensaver in the background with a unix script I call "saverbackground" which is just a command line executable text file containing:

/System/Library/Frameworks/ScreenSaver.framework/Resources/ScreenSaverEngine.app/Contents/MacOS/ScreenSaverEngine -background &

When I run the script in Terminal, it just runs an instance of the Screensaver app in the background. To stop it, I just type ps in Terminal and kill the screensaver process.

Also, I don't see the problems with using the screensaver to lock the screen -- I tried to kill it while it was running or type in a bogus password that was hundreds of characters long, but nothing affects it if you don't type in a valid password.

Is this unusual?



[ Reply to This | # ]
It works like this
Authored by: turkchgo on Jul 10, '03 04:40:36PM

You can make it work too, it's worked on all of my systems so far and is faily easy to do. Here's how:

Activate Screen saver
Move mouse
Type your user name in the name field
instead of typing your password, hold down any letter or number key on the keyboard for 10 seconds or longer 20 seconds maybe.
Let go of the key, and hold down the shift key and hit the HOME key on your keyboard to select all the text that has just been entered
Hit "Control" and "K" together this copys all the text
Hit "Control" and "Y" together this pastes all the text
Keep hitting "Control" and "Y" for about 5 or 10 seconds, or just hold down both keys for a rapid paste function, then hit the return key, in about 5 seconds the screensaver will crash and disappear.



[ Reply to This | # ]