Making backspace be your default delete character
By user12614486 on Oct 20, 2006
One consistently-annoying thing about Solaris is the default terminal control-character settings, which cause Backspace \*not\* to erase a character in most shells (without someone somewhere executing an "stty erase \^H" to fix it up). I'm not going to claim that the default is rational, or try to speculate about where it arises, although I will say that it's being looked at.
However, today, we discovered that it's relatively easy to change; the initial control-character settings are set up by the ldterm module (the "line-discipline" is the one that establishes all the normal character-editing modes that many shells use when using "cooked-mode" terminal I/O). ldterm, it turns out, reads them from a property in the
/kernel/drv/options.conf file, called
ttymodes. It's encoded, but it represents the full termio settings, as
stty -g would output them. The default looks like this:
If you change that 7f (the ASCII code for Del) to 8 (the ASCII code for Backspace), and reboot, then Backspace works as you expect, as soon as you log in, in all shells, thank you very much, the way God intended.