Lőrinczy Zsigmond
2016-01-28 15:18:30 UTC
Hi, I know how old this question is, only I cannot find the answer.
Here's the problem as far as I understand:
1. ncurses/terminfo states that xterm.kbs=^H (aka \b)
2. linux distributors merrily override this,
and define kbs=\177 (aka ^?)
3. some other platforms (eg. AIX) are terminfo-compatible
4. when you connect via telnet/ssh from one platform to the other,
and press backspace, you might get visible characters ^? or ^H
instead of erasing the last character.
(Plus, telnet/ssh daemons tend to happily ignore terminfo,
but that can fixed from some .profile-script:
X=$(tput kbs) && stty erase "$X")
5. there are other terminal-types which could be used (konsole,
for example), but xterm is the favourite terminal-type of
some programs like vim (try Shift+Arrow, Ctrl+Arrow keys
with TERM=xterm and with TERM=konsole)
6. so it would be good to have a standardized terminal type,
which is xterm-based (it's name is xterm-*), and behaves the
same way on every platform (that's what we call 'standard')
it could be either 'xterm-linux' (kbs=\177) or 'xterm-nonlinux'
(kbs=\b') just be the same everywhere
Here's the problem as far as I understand:
1. ncurses/terminfo states that xterm.kbs=^H (aka \b)
2. linux distributors merrily override this,
and define kbs=\177 (aka ^?)
3. some other platforms (eg. AIX) are terminfo-compatible
4. when you connect via telnet/ssh from one platform to the other,
and press backspace, you might get visible characters ^? or ^H
instead of erasing the last character.
(Plus, telnet/ssh daemons tend to happily ignore terminfo,
but that can fixed from some .profile-script:
X=$(tput kbs) && stty erase "$X")
5. there are other terminal-types which could be used (konsole,
for example), but xterm is the favourite terminal-type of
some programs like vim (try Shift+Arrow, Ctrl+Arrow keys
with TERM=xterm and with TERM=konsole)
6. so it would be good to have a standardized terminal type,
which is xterm-based (it's name is xterm-*), and behaves the
same way on every platform (that's what we call 'standard')
it could be either 'xterm-linux' (kbs=\177) or 'xterm-nonlinux'
(kbs=\b') just be the same everywhere