[comp.unix.aux] Automatic Screen Blanking for the Login Console

jdh@punjab.udev.cdc.com (10/19/90)

I have found a kludgy way to get my screen blanker to automatically
take effect when the login console is up.  We all know that screen blankers
can take effect when the "About..." box is selected.  It turns out that
if any old dialog box comes up, screen blankers can run.  So I wrote the
following shell script called "timer":

STR="/mac/bin/Login -m2m -s /mac/sys/Login"
if ps -ef | grep console | grep "$STR" > /dev/null
then
        echo "Login Console Check at "`date` > /dev/console
fi


And I call it periodically through crontab:

5,15,25,35,45,55 * * * * /home/jdh/timer


What happens is:  Every ten minutes, timer checks to see if the console
login is up.  If so, timer writes a time stamp to the console device.
This causes a dialog box to appear on the screen telling the user that
console messages are availble.  If no one clicks the OK button, the blanker
will turn on after its normal wait for inactivity.  Luckily, A/UX only 
queues up two of these dialog boxes so you do not have to click several
hundred OKs after leaving the system idle for a few hours.

I hope this can be of use to someone.


Jeff Holmbeck
Control Data Corporation
jdh@udev.cdc.com
(612)482-3255

andyp@treehouse.UUCP (Andy Peterman) (10/19/90)

In article <27224@shamash.cdc.com> jdh@punjab.udev.cdc.com () writes:
>I have found a kludgy way to get my screen blanker to automatically
>take effect when the login console is up.  We all know ........

...(some code shown here)

>This causes a dialog box to appear on the screen telling the user that
>console messages are availble.  If no one clicks the OK button, the blanker
>will turn on after its normal wait for inactivity.  Luckily, A/UX only 
>queues up two of these dialog boxes so you do not have to click several
>hundred OKs after leaving the system idle for a few hours.

Beware that this will chew up about 50% of your processor time.  Waiting
for something to happen in a modal dialog seems to use a lot of overhead.
If you have any other processes or other ways to login (such as using a
dialup or dialing out with cron), you'll find things going REAL slow.
If nothing else is going on, then it shouldn't matter.

-- 
Andy Peterman                       |   Opinions expressed
treehouse!andyp@gvgpsa.gvg.tek.com  | are definitely those of
(916) 273-4569                      |      my employer!