Path: utzoo!attcan!uunet!aplcen!uakari.primate.wisc.edu!sdd.hp.com!ucsd!ames!dftsrv!hq!mitch From: mitch@hq.af.mil (Mitch Wright) Newsgroups: comp.unix.questions Subject: Re: Preventing Idle in telnet Message-ID: Date: 24 Sep 90 18:25:34 GMT References: <85234@aerospace.AERO.ORG> <2399.26fde5fb@miavx1.acs.muohio.edu> Sender: mitch@hq.af.mil Organization: Air Force HQ, The Pentagon Lines: 38 In-reply-to: pemurray@miavx1.acs.muohio.edu's message of 24 Sep 90 15:54:50 GMT /* * In article <85234@aerospace.AERO.ORG>, * huebner@aerospace.aero.org (Robert E. Huebner) writes: * */ Robert> Looking for advice on how to solve the following problem in UNIX: Robert> I need to find a way to alter telnet so that it will automatically Robert> send characters periodically if the user is idle. The specific case Robert> [ ... ] /* * On 24 Sep 90 15:54:50 GMT, * in article <2399.26fde5fb@miavx1.acs.muohio.edu> * pemurray@miavx1.acs.muohio.edu (Peter Murray) writes: * */ Peter> What you can do is write a small C program to send a space and a Peter> backspace every 25 minutes. Something like: Peter> main() Peter> [...] Peter> printf("\033[OC\033[OD"); Peter> [...] This shouldn't really do the job. When you printf to your screen, it does not simulate the user actually hitting keys; thus, the idle time will continue to accumulate. There is a request to ioctl that you can make to simulate a key being typed -- TIOCSTI. It works for me... ..mitch mitch@hq.af.mil (Mitch Wright) | The Pentagon, 1B1046 | (202) 695-0262 The two most common things in the universe are hydrogen and stupidity, but not necessarily in that order.