stty erase setting

Tomasz Pala gotar at polanet.pl
Mon May 30 12:36:54 CEST 2005


On Sun, May 29, 2005 at 16:12:01 +0300, Elan Ruusamäe wrote:

> setting stty erase from /etc/bashrc fcks up my backspace, at least on 

So you have something fucked up. I suggest reviewing your inputrc and
removing all hardcoded sequences. What's your term? Is it local or
remote?

> and in any case, such things should be in eighter
> 1. terminfo
> 2. /etc/profile

It cannot be in profile, because it's terminal dependand and you can
change it without relogin. And how do you think you set it from
terminfo? How can _remote_ terminal guess what stty to set?

xterm:

~: stty
speed 38400 baud; line = 0;
erase = ^H;
^^^^^^^^^^^
-brkint -imaxbel
~: tput kbs | hexdump -C
00000000  08                                                |.|
00000001
~: ssh xxxxxxxxxxxx
$ stty
speed 38400 baud; line = 0;
[oh, there's NOTHING here]
-brkint -imaxbel
$ tput kbs | hexdump -C
00000000  08                                                |.|
00000001
$ less /etc/passwd
/akhdkasjdhas^H^H^H^H^H^H^H
             ^^^^^^^^^^^^^^ these are literally inserted!

linux console:

~: stty
speed 38400 baud; line = 0;
-brkint -imaxbel
~: tput kbs | hexdump -C
00000000  7f                                                |.|
00000001
~: ssh xxxxxxxxxxxx
$ stty
speed 38400 baud; line = 0;
-brkint -imaxbel
$ tput kbs | hexdump -C
00000000  7f                                                |.|
00000001
$ less /etc/passwd
/akhdkasjdhas^H^H^H^H^H^H^H
             ^^^^^^^^^^^^^^ they do what they should

So I assume that no 'erase' in stty means use default '^?'
(linux-console backspace).

Anyway resetting ANYTHING to tput-returned values MUST NOT break
anything. If it's not the case - there must be some misconfiguration
elsewhere.

-- 
GoTaR <priv0.onet.pl->gotar>        http://vfmg.sourceforge.net/
                                    http://tccs.sourceforge.net/



More information about the pld-devel-en mailing list