Preventing Idle in telnet
Mitch Wright
mitch at hq.af.mil
Tue Sep 25 04:25:34 AEST 1990
/*
* In article <85234 at aerospace.AERO.ORG>,
* huebner at 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 at miavx1.acs.muohio.edu>
* pemurray at 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 at 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.
More information about the Comp.unix.questions
mailing list