Subject: Re: clear screen when logout
To: None <collver@softhome.net>
From: James Wetterau <jwjr@panix.com>
List: port-i386
Date: 10/18/2000 10:41:31
man 5 ttyaction
You could try putting an entry in /etc/ttyaction for a shell script
that figures out the TERM and sends the appropriate sequence. You
have a variable $TTY to help you figure out the term. A sample entry
from the manpage looks like this:
tty0 getty /somewhere/tty_clean ${TTY}
YOu can change that to:
* getty /somewhere/tty_clean ${TTY}
Note the fields are described thus:
ttyname Name of the tty line(s) on which this line should
apply. The name is relative to the /dev directory,
similar to how such de- vices are named in the
/etc/ttys file.
action Name of the action for which this line should apply. The
action names currently defined are "login", "getty",
"telnetd" and "rlogind" which indicate which program is
processing this file. (Note that "login" begins a
login session, while the other three are run after a
login session ends.)other three are run after a login
session ends.)
command What command to run if this record matches.
I've confirmed you can do something like:
* getty echo foo > /dev/${TTY}
To send a message. It should be relatively straightforward to replace
that with a program that figures out the TERM on /dev/${TTY} and calls
tput with the correct parameters to clear the screen.
Regards,
James Wetterau