Screensaver over loginwindow Revisited

Karl Kuehn posted yet another script to get the screen saver working over the loginwindow. I published a similar script in the past. I haven’t tested his version, but at first glance, it looks like Karl’s solution has a couple of improvements over mine:

1) It looks like it should work even with Fast User Switching turned on, and the machine is at the loginwindow with users still logged in.

2) Karl has implemented an elegant method to specify which screensaver module it will run; mine runs the default defined at /System/Library/Frameworks/ScreenSaver.framework/Versions/A/Resources/Engines Default.plist

Screensaver over loginwindow Revisited

22 thoughts on “Screensaver over loginwindow Revisited

  1. paul says:

    hi,
    I’ve ben trying (in vain) to get a functioning screen saver running over the Login Screen for the last couple of days. I have tried the scripts from this page, and the tips over at macosxhints.com
    I am wondering if there has been a change in something since these scripts were written (I’m running 10.4.10 currently) that is leading to them failing?
    What I am seeing is a blank (black) screen instead of a screen saver!
    I know that the screen saver process is kicking in (I can ARD into a machine and see the process running – in fact if I kill the screen saver process the the screen changes from blank back to the Login Window) but the whole point is to see the screen saver (so our students know that the machine is turned on – but the CD screens will not get burn-in).
    Do you have any suggestions / pointers for me?

    Thanks in advance,

    Paul

  2. Which screen saver module are you trying to run? There is a known problem with Quartz Composer screen savers like the RSS saver – they will not run over the login window – you’ll just see a black screen.

    Try a simple module like Computer Name or Abstract and see if they work.

  3. I am assuming that I am continuing to do something wrong with this, but I have been unsuccessful in getting this to work. All the documentation I have been able to find seems to be for 10.3 and prior. I have not been able to find anyone that has successfully had the screensaver run over the loginwindow. Is this an issue with 10.4.x and how it handles launchd? I know prior to 10.4 there was cron but that is now extinct from what I can tell. Any ideas, suggestions or thoughts on how to get it work or what I might be doing wrong?

  4. cron is not extinct. launchd in Tiger is …unreliable when it comes to running recurring tasks. Be a good troubleshooter and remove variables. Take launchd out of the equation, and try running this with just cron. Don’t run a fancy Quartz Compositor screensaver – stick with a basic one like a slideshow or Flurry or Computer Name.

    I’m running the screensaver over loginwindow on 500+ Tiger machines, including the one I’m typing on right now. I’m _not_ using launchd for this, just plain old cron.

  5. paul says:

    Hi,
    just FYI, I revisited the screen saver issue after not thinking about it for a couple of months, and wouldn’t you know it it’s working as advertised now!
    Amazing what some time off from a problem can do.

    Thanks for the info.

  6. Bo says:

    Hello,

    I know this is really heavy to drop on you but I am desperate. My ex-girlfriend contacted me out of desperation this week after not having spoken in years due to a nasty end in need of help. Her little brother took his own life earlier in the week.

    I don’t want to divulge too many details in a public venue but I need help getting past an screensaver password. It’s a Mac Book running OS X and it was made in 2006. At the moment that’s all I know. I don’t know versions or anything yet. I don’t want to turn the machine off and try and get root access because turning it off may cause the loss of the information her family needs.

    Anyways, if anyone thinks that can help, please email me. Thank you.

    Bo
    bonakdar AT intensemma .com

  7. ladiesduck says:

    Greg,

    So I came across both yours and Karl’s method for doing this. It works splendidly. I am able to get it working no problem with one small exception. Now I noticed above people were having trouble with the computer just showing a blank screen. I am having the same problem but only when using either the “Choose Folder…” or “Pictures Folder” modules. Any other screen savers (3rd party included) works fine. Any idea why this would be and/or how to get it up and running?

    Thanks,

    Jake

  8. If you are using Karl’s version, I think the Pictures Folder one will work if you change

    $screenSaverEngine -module $moduleName &

    to

    $screenSaverEngine -module “$moduleName” &

    since there’s a space in the moduleName.

    This fails:

    /System/Library/Frameworks/ScreenSaver.framework/Versions/Current/Resources/ScreenSaverEngine.app/Contents/MacOS/ScreenSaverEngine -module Pictures Folder
    2009-02-27 15:15:35.870 ScreenSaverEngine[34550:807] argument ‘Folder’ not understood

    but:

    /System/Library/Frameworks/ScreenSaver.framework/Versions/Current/Resources/ScreenSaverEngine.app/Contents/MacOS/ScreenSaverEngine -module “Pictures Folder”

    works.

    BUT remember this will display the items from the Pictures folder of the current user – which at the login window is root. So you’d have to populate root’s Pictures folder (which probably doesn’t even exist yet) with some interesting pictures.

    As for “Choose Folder…”, that might work as well as long as you write the
    lastPictureDirectoryChosen key to the right plist.

    I can’t really test any of this, since there’s no way to run the ScreenSaver over the loginwindow in Leopard any more…

  9. ladiesduck says:

    That worked like a charm. However it looks like the “Pictures Folder” screensaver defaults to panning and zooming around the picture. I’ve turned this off in System Preferences but to no avail.

  10. Those settings are stored in the com.apple.screensaver.slideshow preferences domain, and again, you’ll need to modify root’s version.

    Something like:

    defaults -currentHost read com.apple.screensaver.slideshow

    to read the values you’ve set for the current user, then use

    sudo defaults -currentHost write com.apple.screensaver.slideshow SomeKey ItsValue

    to set those. Alternately, you could copy the ~/Library/Preferences/ByHost/com.apple.screensaver.slideshow.XXXXXXX.plist from the current user’s home dir to root’s.

  11. ladiesduck says:

    That’s exactly what I thought was happening. However if I look at the com.apple.screensaver.slideshow.XXXXXX.plist in root’s library directory it shows only the random key being TRUE. When the screensaver comes on when I am logged in as root the behavior of the pictures matches what I see in root’s .plist file. However when I am at the login screen it has pan and zoom enabled.

  12. I get what I assume is your desired behavior when I copy a correctly configured com.apple.screensaver.slideshow.xxxxxxxx.plist to root’s Library/Preferences/ByHost. The file looks something like:

    defaults -currentHost read com.apple.screensaver.slideshow
    {
    Center = 0;
    Crop = 1;
    Crossfade = 0;
    Random = 1;
    SlideFolder = “/Library/Desktop Pictures/Black & White”;
    }

    Which is equivalent to

    sudo defaults -currentHost write com.apple.screensaver.slideshow Center -bool FALSE
    sudo defaults -currentHost write com.apple.screensaver.slideshow Crop -bool TRUE
    sudo defaults -currentHost write com.apple.screensaver.slideshow Crossfade -bool FALSE
    sudo defaults -currentHost write com.apple.screensaver.slideshow Random -bool TRUE
    sudo defaults -currentHost write com.apple.screensaver.slideshow SlideFolder “/Library/Desktop Pictures/Black & White”

  13. ladiesduck says:

    So I ran your commands (with some modifications) and get the below as a result when I read the .plist file. Everything looks in order but still no change.

    sudo defaults -currentHost read com.apple.screensaver.slideshow
    {
    Center = 0;
    Crop = 0;
    Crossfade = 1;
    Random = 1;
    SlideFolder = “/private/var/root/Pictures”;
    Zoom = 0;
    }

    What is confusing to me is that I get my desired behavior (no zoom/pan) when logged in as root but when I logout it seems to ignore the plist file. If I understand correctly the script simply uses root’s screensaver preferences as parameters for running the screensaver over the login window so what I get logged in as root and logged out should be identical right?

    I found that if I delete the com.apple.screensaver.slideshow.XXXX.plist file I get the same behavior (zoom/pan). Is it possible that the script is not locating the .plist file correctly?

  14. ladiesduck says:

    If you don’t have an idea as to why that is happen I don’t suppose you know how to get this script to work with Quartz Composer projects? They work just fine as a regular screen saver but don’t show up on the login screen. If I could get that working I could just make my own screen saver.

    Thanks for all your help.

  15. ladiesduck says:

    Don’t mean to bug again but I was wondering if you had any ideas about my problem?

    Thanks.

  16. Carlos says:

    I’ve tried the script from the prowiki website. The script works, but as Paul mentioned, the screen goes black instead of the screen saver coming on. I set the default to ‘Flurry’ but it does not work.

    Also, how can I make the screensaver (once I get it working) come on faster? The idleTime variable is in seconds and is currently set to 900.

    Any suggestions?

  17. Carlos:

    If you read further in the comments, Paul got it working, but didn’t say what he did differently. You are probably making a minor error, but it’s hard to guess what.

    As for getting the screensaver to come on faster, just set the idleTime variable to a lower value.

Comments are closed.