I'm seeing stty, not a typewritter
messages on hpux (despite an interactive terminal check?), and am guessing that these are due to the stty lines in my .kshrc file:
case $- in
*i* )
stty hupcl ixon ixoff
stty erase '^?' kill '^U' intr '^C' eof '^D' susp '^Z'
;;
esac
Two questions:
1) I know why the erase line is there, since backspace doesn't work without it. These .kshrc lines I've inherited, but don't know what they do.
Anybody know the point of the hupcl ixon ixoff lines? The stty man page isn't particularly enlightening:
hupcl (-hupcl) Hang up (do not hang up) modem connection on
last close.
ixon (-ixon) Enable (disable) START/STOP output control.
Output is stopped by sending an ASCII DC3 and
started by sending an ASCII DC1.
ixoff (-ixoff) Request that the system send (not send)
START/STOP characters when the input queue is
nearly empty/full.
2) Is there a different way to check for interactive terminals. I had tty -s ; if [ $? ] before but that also appears to be noisy on hpux.
ixon
and ixoff
are used to insist that Ctrl-s and Ctrl-q be interpreted as control flow (scroll lock) signals. They're the default on most systems, but if you have a fast connection and/or don't anticipate a volume of output that your terminal can't handle, you're fine to turn them off.
I typically use stty -ixon -ixoff
so I can reclaim the Ctrl-s and Ctrl-q key bindings for more modern purposes (e.g. "save" and "quit").
For more details: https://unix.stackexchange.com/questions/12107/how-to-unfreeze-after-accidentally-pressing-ctrl-s-in-a-terminal#12146