setting TERM - actually about terminal initialization
Rob Warnock
rpw3 at redwood.UUCP
Mon Feb 25 21:50:01 AEST 1985
+---------------
| I'd like to submit a counterproposal. These ideas are not original.
| 1) Define a tty ioctl that saves the current tty modes in an extra place...
| 2) Define a tty ioctl that resets the current tty modes ...
| 3) Make /etc/rc set from a script permanent tty modes ...
| 4) A tty would reset itself on close to the permanent tty modes.
| Bill Sebok Princeton University, Astrophysics
| {allegra,akgua,burl,cbosgd,decvax,ihnp4,noao,princeton,vax135}!astrovax!wls
+---------------
The Fortune Systems FOR:PRO version of Unix does almost exactly that,
with the difference that "savemodes" saves "the current characteristics
as the defaults for the tty on subsequent first opens". Thus, item #2 is
not provided (but doesn't seem to be needed), and #4 is accomplished in
a slightly different way (first open rather than last close). The Fortune
feature works just fine, and seems to do exactly what you want. Since
"stty" sets the modes as it encounters them, one only needs to mention
the "savemodes" last. I put the following two lines are in the ".rc"
file on my system, as needed for my configuration:
stty 1200 savemodes >/dev/tty01 # Diablo printer - make it sticky
stty 1200 hupcls savemodes >/dev/cul0 # kludge for hangup problem
Is this what you were suggesting?
(Note: I may be biased in this matter, as I was working there when this
feature was implemented. Nevertheless, I have found it useful myself.)
Rob Warnock
Systems Architecture Consultant
UUCP: {ihnp4,ucbvax!dual}!fortune!redwood!rpw3
DDD: (415)572-2607
USPS: 510 Trinidad Lane, Foster City, CA 94404
More information about the Comp.unix.wizards
mailing list