Wanted: Screen saver for SCO Xenix 2.2.3

Chip Rosenthal chip at vector.Dallas.TX.US
Sat Aug 26 10:38:13 AEST 1989


In article <259 at placer1.COM> amos at placer1.COM (Kevin Amos) writes:
>Could someone please send me a screen saver program that
>will run on SCO 286 Xenix 2.2.3.

This will clear console screens idle for more than 15 mins.

    :
    who -u | awk '{
	tty=$2				# basename of tty
	idle=$6				# time idle in "hh:mm"
	if ( tty !~ /^tty[01][0-9]$/ || idle == "." )
	    next			# skip non-console & non-idle terms
	n = split(idle,x,":")
	if ( x[1] * 60 + x[2] > 15 )	# print tty if idle > 15 mins
	    print tty
    }' | while read tty ; do echo "\f" > /dev/$tty ; done

Suitable for running from cron.  Also note that writing to the console
screen will reset that screen's idle time counter.  Also note that this
might need to be run as root if permissions require (e.g. "mssg n" was
run on one of the screens).
-- 
Chip Rosenthal / chip at vector.Dallas.TX.US / Dallas Semiconductor / 214-450-5337
"I wish you'd put that starvation box down and go to bed" - Albert Collins' Mom



More information about the Comp.unix.xenix mailing list