tech-userlevel archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
Re: stty erase WTF
In article <20160118200942.GA10665%panix.com@localhost>,
Thor Lancelot Simon <tls%panix.com@localhost> wrote:
>What's been done to terminal handling in NetBSD 7.0?
>
>I now see the following, grossly broken behavior:
>
>1) On my ssh client, stty shows erase is ^?
>
>2) I ssh to a NetBSD-7 machine; stty shows erase is ^?
>
>3) I "su -" or "sudo -i". stty shows erase is now ^H
>
>The culprit appears to be these lines in /root/.profile:
>
> if [ -x /usr/bin/tset ]; then
> eval $(tset -sQrm 'unknown:?unknown')
> fi
>
>But whatever the reason is, this needs to be fixed. My ssh session
>explicitly propagated erase=^? to the netbsd-7 system, and nothing
>we ship in the system defaults has any business overriding that.
The reason is historical. In the very old days, the "terminal" was
a combination of screen and a keyboard (no mice back then), and the
termcap/terminfo entry for each "terminal" knew the keycodes that
the keyboard would send, so it made itself authoritative to set them.
These days, we have "soft" terminal emulators and their keyboards
differ from implementation to implementation (depending both on the
hardware manufacturer and the default software settings).
There are two solutions to this:
1. Remove completely the tset setup from root's .profile.
There is no reason to set the initialization sequence
or to set the terminal characters in modern consoles.
If the user wants to plug a real vt100 to serial port,
tset is still there and they could add it to their
profile (they usually know better anyway).
2. Add a flag to tset (-N or something) instructing it
not to set the terminal characters
You can guess what my vote is.
christos
Home |
Main Index |
Thread Index |
Old Index