Path: utzoo!utgpu!news-server.csri.toronto.edu!clyde.concordia.ca!uunet!van-bc!twg!bill From: bill@twg.UUCP (Bill Irwin) Newsgroups: comp.unix.questions Subject: Re: Automatic lockscreen Message-ID: <181@twg.UUCP> Date: 16 Jun 90 07:18:41 GMT References: Reply-To: bill@.UUCP (Bill Irwin) Distribution: comp Organization: TWG The Westrheim Group, Vancouver BC Lines: 17 Summary: Expires: Sender: Followup-To: Keywords: In article pat@tbird1.prime.com (Philip Tanner) writes: > > I would like to write a script to automatically lock a workstations screen if >the keyboard has been inactive for a certain period of time. My problem is I don't >know how to "watch" the keyboard for activity. > > Any suggestions would be appreciated. Try looking at the time when you do a "ls -l /dev/ttyxx". It should show you when the last I/O took place on the terminal. You have to be careful though. If a user can start a long process which doesn't produce any I/O as it is going, the port may look dormant when it's not. -- Bill Irwin - TWG The Westrheim Group - Vancouver, BC, Canada ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ uunet!van-bc!twg!bill (604) 431-9600 (voice) | UNIX Systems Bill.Irwin@twg.UUCP (604) 431-4629 (fax) | Integration