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


Click here to return to the 'Run any ScreenSaver from the Login window' hint
The following comments are owned by whoever posted them. This site is not responsible for what they say.
Run any ScreenSaver from the Login window
Authored by: SunByrne on Jul 13, '04 05:58:53PM

OK, so I saved TrumpetPower's script an edited the root crontab to run that script and... it still doesn't work.

Any ideas?



[ Reply to This | # ]
Run any ScreenSaver from the Login window
Authored by: makeitsimple on Sep 17, '05 11:09:04AM

The original hint annoyed me when I was logged-in, but would NEVER run over the login screen?!
So, I made the changes suggested in sub-replies to check for a logged-in user and now it NEVER RUNS AT ALL - at least the sub-replies did their trick properly...!
What's going on?
Someone needs to re-write this hint from scratch and get it right for everyone (anyone) in the best way (what is missing below???):
1) As your everyday/normal user, activate root account and set its password via NetInfo Mgr.
2) Make sure your login screen is set for "Name and Password" (not just "LIST OF USERS" !!!) and log out
3) Login as root
4) Open System Pref.'s and configure screen saver
5) Logout
6) Log in as your regular/normal user and DEACTIVATE root
7) Edit private/etc/crontab (vi sucks unless you use it everyday - use pico instead for sanity, but make sure to "fix" any long lines that split onto a new line), by putting the good command from the "Quick Update" sub-replies above into a script and then just running that script from crontab. I have this script in my home directory, aka ~/ScreenSave
8) Save it and watch nothing happen...oh joy!
Anyone have a clue (I sure don't)???



[ Reply to This | # ]
Run any ScreenSaver from the Login window
Authored by: makeitsimple on Sep 17, '05 01:36:03PM

If you too have had enough of non-working cryptic hints, take reidab's edited script in his reply to the "Quick Update..." post on this hint, and use it with the the full scoop found here:
http://homepage.mac.com/gregneagle/iblog/C1833135211/E1305475742/



[ Reply to This | # ]
Run any ScreenSaver from the Login window
Authored by: UncleJohn on Jan 22, '06 07:38:34AM
I found the check for logged in users to be unreliable under 10.4.4 with FUS enabled. But using the "open" command on the ScreenSaver app itself seems to solve a lot of problems.

1. If a user is logged in, it will show that user's screen saver

2. If login window is displayed, shows the default screen saver

I can skip the logged-in user step entirely, and the framework just seems to do the right thing. I haven't figured out how to pass command-line args via the "open" command, so the idle check is done separately. I also left in the check for screen saver already running, but this does not even seem necessary.

To change the default screen saver, edit /System/Library/Frameworks/ScreenSaver.framework/Versions/A/Resources/EngineDefaults.plist, changing moduleName to whichever one you want to use. The default is "Flurry" - I used "Pictures Folder".

If you use "Pictures Folder", you must give one to the root user. I made a symlink "Pictures" in /var/root to the folder I wanted to use. There is no need to enable root user login.

For some reason, I could never get this to work using launchd (black screen). But it works fine under cron.

I'm also not sure why it uses the default screen saver, even if root user is enabled has one specified in preferences. YMMV.


#!/bin/sh
# First check to see if the screen saver is already running!
procList=`/bin/ps -auxwww | /usr/bin/grep -c "ScreenSaverEngine"`

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
    open /System/Library/Frameworks/ScreenSaver.framework/Versions/A/Resources/ScreenSaverEngine.app
  fi
fi


[ Reply to This | # ]