Path: utzoo!utgpu!news-server.csri.toronto.edu!rutgers!gatech!tut.cis.ohio-state.edu!n8emr!uncle!celebr!jbm From: jbm@celebr.uucp (John B. Milton) Newsgroups: comp.unix.sysv386 Subject: Re: screen blanker? Message-ID: <1990Oct18.072836.7109@celebr.uucp> Date: 18 Oct 90 07:28:36 GMT References: <1990Oct4.191130.16902@mccc.uucp> <1990Oct13.204544.25996@jpradley.uucp> <15957@bfmny0.BFM.COM> Organization: Celebrezze Committee Lines: 56 In article <15957@bfmny0.BFM.COM> tneff@bfmny0.BFM.COM (Tom Neff) writes: >By the way (to atone for my bogus 'screenblank.sh' silliness) somebody >DID write a UNIX screen blanker a while back, but I have *no* idea what >it was called. > >You could write your own. The idea is just > > * have a list of tty devices to check > > * periodically scan their access and modify times > > * when a tty goes "old" send it display-off (ANSI) > > * when a tty goes "new" send it display-on > >There are various refinements you could make. It should work for the >console at least. We have a wild collection of terminals, including a VT-100, two HP26xx, an H-19, three uvt1224, two att605, and PCs running PCU. I put a list of the ttys with terminals that need help blanking in /etc/ttyblank. The first field is the name of the tty device, the second is the actual escape sequence to send. To get around /dev/tty access problems, I only attempt a screen blank if there is no one logged in. : # vi:set ts=2 sw=2: while read i; do set $i if who -u|grep $1>/dev/null; then : else sh -c "echo \"$2\" > /dev/$1" & bpid=$! sleep 10 kill $bpid fi done