AAM: Screensaver for Login Window

by Aaron Wright Feb 12, 2007

I don’t usually like posting unanswered questions on a Monday, but today we have one. Okay, technically a few people have given their answers, but unfortunately they aren’t the right ones, although very close—with a bit of luck one of our readers can help further today.

Frank Young, System Administrator at a University, is curious to know if there’s a way of setting up a screen saver at the login window of a Mac. His plight is that when the Mac is left idle for some time, the screen switches itself off and causes his students to believe that the Macs aren’t switched on and ready for use—thus, they revert to a Windows machine, a problem for one System Administrator who is desperate to see his network switch to Mac only.

Founder, publisher, and Chief Editor of Apple Matters, Hadley Stern, has done his best this week to answer Frank Young’s question, although it appears that the solution is still out there in the wild waiting to be found.

Hadley posted up a script which could technically work with local account logins, but unfortunately the computers Frank Young uses are Campus-wide labs with non-local account logins.

It’d be nice if someone out there could add to Hadley’s answer, or possibly offer a completely different one that would work based on Mr. Young’s scenario. If you’ve got your answer, feel free to leave a comment at the bottom of this article or visit the thread Screensaver for Login Window in the AAM forums.

Hopefully we’ll have a solution for this one next week. Don’t forget to submit any other pressing questions you have and we’ll do our best to answer them for you. All the best folks!

Question Of the Week

Screensaver for Login Window

By: Frank Young

There are not really too many advantages that Windows enjoys over a Mac, except in two areas: Marketshare and the ability to run a screensaver over the login window.

I’m a System Admin at the University of Cincinnati and I’m in charge of the Macintosh computers in our student labs. For the last three months I have been searching for a solution that would allow me to run the Screensaver Engine over the login window when the unit sits idle. Yes, I know that I could just dim the screen, but the problem with that is that if the screen is dim, our students tend to think that the unit is down and will use a Windows machine instead. If the higher-ups see the students only using the Windows machines, then they might not be inclined to continue investing in Macs for our campus labs.

So, I want to find some type of solution that will let me run a screensaver over the login window. I don’t mind if it’s Command Line only, but I would prefer that it be Open Source (we like Open Source software here) and that if it isn’t free, that the license for the software be relatively low-cost and not very restrictive. Also, the solution or method must be proven to work reliably and securely. Can anyone help me or point me in the right direction?

Answer of the Week (Almost)

By: Hadley Stern

Interesting problem...and I have to admit I never would have thought of the issue until you mentioned it. How about this for a solution. I didn’t try it out myself, so let us know if it does the trick.

I came across this code, here:

Now with Mac OS X 10.3, it is possible to run Apple’s screensaver over the login window. It behaves exactly as one expects. You’ll need to install a script that runs the screensaver, and you’ll need cron to call it periodically. Here’s the script I use (note that no lines should be wrapped—be careful with the line beginning “idleTime="):

#!/bin/sh

# define the path to the screen saver engine
launchPath="/System/Library/Frameworks/ScreenSaver.framework/Versions/A/Resources/ScreenSaverEngine.app"

# check to see if a user is logged into the console
loggedInUser=`/usr/bin/who | /usr/bin/grep console | /usr/bin/cut -d “ “ -f 1`

if [ “$loggedInUser” = “” ]; then
# no one is logged in
# but first check to see if the screen saver is already running!
procList=`/bin/ps -auxwww | /usr/bin/grep -c “$launchPath"`

if [ $procList -lt 2 ]; then
# the screen saver is not already running, let’s launch it,
# but only if the system has been idle at least 5 minutes

#get the system idle time in seconds
idleTime=`/usr/sbin/ioreg -c IOHIDSystem | /usr/bin/perl -ane ‘if (/Idle/) {$idle=int((pop @F)/1000000000); print $idle,"\n"; last}’`

if [ $idleTime -gt 300 ]; then
/usr/bin/open “$launchPath”
fi
fi
fi

exit 0

Make sure the script is executable.

View thread

Have a technical question? Drop by our dedicated forums and leave a message. You’re sure to get a reply from one of our regular readers or even a member of our staff.

Comments

  • The question should be, how do you educate your users?  I am sorry but when your monitor is on you will be consuming anywhere from 30 to 150 Watts.  That adds up to a lot of kWh, and a lot of CO2 emmision for a large deployment.

    This is a big deal.  Check out this EnergyStar report.
    http://www.energystar.gov/ia/partners/prod_development/revisions/downloads/computer/ComputerPowerMnmt.pdf
    It estimates that 18 million tons of CO2 could be saved just by smarter settings on your machine.

    United States Ray Fix had this to say on Feb 12, 2007 Posts: 21
  • A big sign on each power saving Mac monitor, maybe?

    “Poke me. I’m working.”

    We could get t-shirts made up, for folks to wear at work too?

    Canada James Bain had this to say on Feb 12, 2007 Posts: 33
  • the answer is here…

    http://prowiki.isc-csg.upenn.edu:16080/index.php/Using_a_ScreenSaver_over_the_LoginWindow

    As for the local admin mentionned in there, well it’s only to install the script. If you still think that you cannot install this, well I have news for you, go back to your basics!

    You either push images to your machines (do this before pushing the image), or you netboot them (again do this on the image file), or you simply install each system one-by-one (then you actually have a local admin account on the machine).

    Canada uuseless had this to say on Feb 12, 2007 Posts: 1
  • When you start Windows, if you don’t click a user name on the Welcome screen or press CTRL+ALT+DEL to log on if prompted, after ten minutes the default Windows logon screensaver will start. You can change this logon screensaver by editing the registry. Here’s how:

    1 Click Start | Run.

    2 In the Open box, type: regedt32 or regedit.
    3 Click OK.
    4 In the registry editor, navigate to this key: HKEY_USERS\.DEFAULT\Control Panel\Desktop
    5 In the right pane, double click SCRNSAVE.EXE.
    6 Type the filename of the screensaver you want to use as the logon screensaver in the Value Data field of the Edit String dialog box.
    7 Click OK.
    8 Close the registry editor:)

    China wow gold had this to say on Apr 12, 2007 Posts: 6
  • Page 1 of 1 pages
You need log in, or register, in order to comment