[comp.unix.wizards] Auto-darkening of SUN screen

et>@adm.BRL.MIL (12/08/88)

Dipl.-Math. Michael Stumpf
Psychological Institute
University of Freiburg
Niemensstr. 10
D-7800 Freiburg im Breisgau
West Germany


==================

Does anyone have a program (a modified getty?) which darkens
the screen of a SUN workstation after some minutes of
displaying "<host> login:"? We do not want to switch on and off
the screens several times a day and we also do not want to stay
them in the state described above for several hours.
After touching some key on the keyboard, the screen has to be
"switched on" of course.
Michael.

khera@romeo.cs.duke.edu (Vick Khera) (12/09/88)

In article <17746@adm.BRL.MIL> et>@adm.BRL.MIL writes:
>Dipl.-Math. Michael Stumpf
>University of Freiburg
>West Germany
> ...
>Does anyone have a program (a modified getty?) which darkens
>the screen of a SUN workstation after some minutes of
> ...
>Michael.

screenblank is a program that comes with the Sun that blanks the screen
after about ten minutes of inactivity.  it is usually started up in one of
the rc.* files at boot time.

							v.

=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
ARPA:	khera@cs.duke.edu		Department of Computer Science
CSNET:	khera@duke        		Duke University
UUCP:	decvax!duke!khera		Durham, NC 27706

lrj@ishtar.cs.cornell.edu (Lewis Jansen) (12/09/88)

In article <17746@adm.BRL.MIL> et>@adm.BRL.MIL writes:
> [he wants something to shut down the video on a Sun after some
>  amount of idle time -- lrj]
>Michael.


	  Try the "screenblank" program as distributed with SunOS 3.2
	and higher.  This has worked for us quite well.

	  (sorry for the follow up, but the local mailer ralphed when
	it was handed the "et>@adm.brl.mil" address... *sigh*)


	
				-- Lewis R. Jansen, LASSP Systems Grunt
					lrj@helios.tn.cornell.edu
					  ...!cornell!lassp!lrj
	    "You can't fight in here, this is the War Room!"

rgrodrig@pttesac.UUCP (Robert Rodriguez) (12/09/88)

In article <17746@adm.BRL.MIL> et>@adm.BRL.MIL writes:
>Does anyone have a program (a modified getty?) which darkens
>the screen of a SUN workstation after some minutes of
>displaying "<host> login:"? We do not want to switch on and off
>the screens several times a day and we also do not want to stay
>them in the state described above for several hours.
>After touching some key on the keyboard, the screen has to be
>"switched on" of course.
>Michael.

See screenblank(1).  We have the following line in our /etc/rc.local file:

/usr/bin/screenblank -d 600

Works like a charm.

Robert Rodriguez

moran@tron.UUCP (Harvey R Moran) (12/09/88)

In article <17746@adm.BRL.MIL> et>@adm.BRL.MIL writes:
>Dipl.-Math. Michael Stumpf
>Psychological Institute
>University of Freiburg
>Niemensstr. 10
>D-7800 Freiburg im Breisgau
>West Germany
>
>
>==================
>
>Does anyone have a program (a modified getty?) which darkens
>the screen of a SUN workstation after some minutes of
>displaying "<host> login:"? We do not want to switch on and off
>the screens several times a day and we also do not want to stay
>them in the state described above for several hours.
>After touching some key on the keyboard, the screen has to be
>"switched on" of course.
>Michael.


    This is not quite darkening, but perhaps it will suit your
purpose as well.  It works for us.
    You didn't say what O/S you are using, but if it is
Sun OS 3.5 or Sun OS 4.x, you might try this.  Use an account
called "saver" set up as below.  It is the responsibility of
each user logging out to log in as saver.  This automatically
runs the suntools "lockscreen" program with the -e option.  That is, the
"game" of life patterns are drawn on the screen until a key is struck.
At that point you can select the QUIT icon and double click to exit
lockscreen.  Saver is automatically logged out and you get a login
prompt.
    If there is a security hole here (I don't think so), it wouldn't
break my heart if you explained it to me.  At the moment, we are also
physically secure, but someday ... who knows.

            Harvey Moran      moran%tron.UUCP@umbc3.UMD.EDU
----------------------------------------------------------------------
    Information about account "saver"
----------------------------------------------------------------------
Script started on Wed Nov  9 05:47:09 1988
$ grep saver /etc/passwd
saver::28:15:Screen Saver Login:/usr/users/saver:
$ ls -al /usr/users/saver
total 6
drwxr-xr-x  2 root          512 Aug 25 18:33 .
drwxr-xr-x  7 root          512 Nov  2 08:30 ..
-rw-r--r--  1 root           78 Aug 25 18:33 .defaults
-rw-r--r--  1 root           15 Aug 24 15:38 .profile
-rw-r--r--  1 root          110 Aug 25 18:45 .rootmenu
-rw-r--r--  1 root           14 Aug 24 15:29 .suntools
$ ls -ald /usr/users/saver
drwxr-xr-x  2 root          512 Aug 25 18:33 /usr/users/saver
$
script done on Wed Nov  9 05:50:01 1988
----------------------------------------------------------------------
         The files in "saver"'s home directory
----------------------------------------------------------------------
#! /bin/sh
# This is a shell archive.  Remove anything before this line, then unpack
# it by saving it into a file and typing "sh file".  To overwrite existing
# files, type "sh file -c".  You can also feed this as standard input via
# unshar, or by typing "sh <file", e.g..  If this archive is complete, you
# will see the following message at the end:
#		"End of shell archive."
# Contents:  .defaults .profile .rootmenu .suntools
# Wrapped by moran@mustang on Wed Nov  9 05:52:26 1988
PATH=/bin:/usr/bin:/usr/ucb ; export PATH
if test -f '.defaults' -a "${1}" != "-c" ; then 
  echo shar: Will not clobber existing file \"'.defaults'\"
else
echo shar: Extracting \"'.defaults'\" \(78 characters\)
sed "s/^X//" >'.defaults' <<'END_OF_FILE'
XSunDefaults_Version 2
X/SunView/Rootmenu_filename	"/usr/users/saver/.rootmenu"
END_OF_FILE
if test 78 -ne `wc -c <'.defaults'`; then
    echo shar: \"'.defaults'\" unpacked with wrong size!
fi
# end of '.defaults'
fi
if test -f '.profile' -a "${1}" != "-c" ; then 
  echo shar: Will not clobber existing file \"'.profile'\"
else
echo shar: Extracting \"'.profile'\" \(15 characters\)
sed "s/^X//" >'.profile' <<'END_OF_FILE'
Xsuntools 
Xexit
END_OF_FILE
if test 15 -ne `wc -c <'.profile'`; then
    echo shar: \"'.profile'\" unpacked with wrong size!
fi
# end of '.profile'
fi
if test -f '.rootmenu' -a "${1}" != "-c" ; then 
  echo shar: Will not clobber existing file \"'.rootmenu'\"
else
echo shar: Extracting \"'.rootmenu'\" \(110 characters\)
sed "s/^X//" >'.rootmenu' <<'END_OF_FILE'
X#
X#	@(#)rootmenu	1.2 86/10/08 SMI
X#
X#	suntools root menu
X#
X"Lock Screen"		lockscreen -e
X"Exit Suntools"		EXIT
END_OF_FILE
if test 110 -ne `wc -c <'.rootmenu'`; then
    echo shar: \"'.rootmenu'\" unpacked with wrong size!
fi
# end of '.rootmenu'
fi
if test -f '.suntools' -a "${1}" != "-c" ; then 
  echo shar: Will not clobber existing file \"'.suntools'\"
else
echo shar: Extracting \"'.suntools'\" \(14 characters\)
sed "s/^X//" >'.suntools' <<'END_OF_FILE'
Xlockscreen -e
END_OF_FILE
if test 14 -ne `wc -c <'.suntools'`; then
    echo shar: \"'.suntools'\" unpacked with wrong size!
fi
# end of '.suntools'
fi
echo shar: End of shell archive.
exit 0

rwl@uvacs.cs.Virginia.EDU (Ray Lubinsky) (12/13/88)

In article <957@pttesac.UUCP>, rgrodrig@pttesac.UUCP (Robert Rodriguez) writes:
> In article <17746@adm.BRL.MIL> et>@adm.BRL.MIL writes:
> >Does anyone have a program (a modified getty?) which darkens
> >the screen of a SUN workstation after some minutes of
> >displaying "<host> login:"? We do not want to switch on and off
> >the screens several times a day and we also do not want to stay
> >them in the state described above for several hours.
> >After touching some key on the keyboard, the screen has to be
> >"switched on" of course.
> >Michael.
> 
> See screenblank(1).  We have the following line in our /etc/rc.local file:
> 
> /usr/bin/screenblank -d 600
> 
> Works like a charm.

Screenblank may be fine for private offices where the user is aware of how
his/her machine behaves, but it's less than beneficial for public workstations.
You invariably have people thinking that the screen is off and turning off
power to the monitor only to find that it was on in the first place.  I have no
idea why the original poster would not want the screen to be white-on-black for
an extended period of time.

I set up all my Suns with a modified gettytab for the console:

	# Special Sun console for automatically blackening the screen:
	S|Sun|Sun-console:\
		:sp#9600:lm=\E[q\14%h login\72 :

and then modify the console entry in /etc/ttys (for earlier releases) to be:

	1Sconsole

or the console entry in /etc/ttytab (for later releases) to be:

	console	"/usr/etc/getty Sun-console"	sun		on

Hence, the user will also get a white-on-black screen for login sessions as
well.  For those who prefer dealing with a black-on-white screen, I have a
simple program called "white" which echos the proper sequence ("\033[p") to
change the screen (first making sure that it is really being run from the
console).  In case the user decides that the default way is preferable, I have
a program called "black" to reverse the process.  At any rate, when the user
logs out, the screen is cleared and turned to white-on-black mode with the
login message at the top of the screen.

I've never had any complaints about the set up.  Many people prefer their non-
suntools sessions to be white-on-black; I get the satisfaction of knowing that
the phosphor is less likely to burn away.

-- 
| Ray Lubinsky,                    UUCP:      ...!uunet!virginia!uvacs!rwl    |
| Department of                    BITNET:    rwl8y@virginia                  |
| Computer Science,                CSNET:     rwl@cs.virginia.edu  -OR-       |
| University of Virginia                      rwl%uvacs@uvaarpa.virginia.edu  |