Submit Hint Search The Forums LinksStatsPollsHeadlinesRSS
14,000 hints and counting!


Click here to return to the 'There is another way' hint
The following comments are owned by whoever posted them. This site is not responsible for what they say.
There is another way
Authored by: atverd on Oct 05, '04 12:59:36PM

This is a very common and very annoying problem. Your remote host expects some character to be used as "erase", a terminal program you use sending some character as "erase". If they differ - sometimes you getting ^? or ^H when pressing backspace. So to fix this you just need bring both parts in sync.
1. When connected type "stty -a" and in output find what is expected to be an erase code (erase = ^? f.e.)
2. Type CTRL-v and press your backspace. You'll see what code is sent as "erase". ^H f.e.
3. Type "stty erase ^H" and this is it. Now they'll understand each other.



[ Reply to This | # ]
There is another way
Authored by: cougar718 on Oct 05, '04 02:12:36PM

That explanation should be the tip. I have been lookin' for a solution to that problem for a long time. Thanks man!

---
Rick alias cougar



[ Reply to This | # ]
There is another way
Authored by: guybrush on Oct 05, '04 02:25:26PM

actually already a hint, i remember using the hint myself in my .bash_profile:

http://www.macosxhints.com/article.php?story=20040607193546219&query=stty+erase



[ Reply to This | # ]
There is another way
Authored by: jeremyp on Oct 05, '04 02:23:16PM

There's an easier way.

Just log in to the machine and type "stty erase " (note the space after "erase") and then hit the backspace key. Either the last space will get erased (backspace functioning correctly, delete the rest of the line) or the correct control character will appear on the screen and you can just press return then.



[ Reply to This | # ]
There is another way
Authored by: dthorburn on Oct 05, '04 08:05:16PM
The way I handle this is to have a pair of shell aliases set up for the stty erase entry. in your ~/.tcshrc:

alias ^H 'stty erase ^H'
alias ^? 'stty errase ^?'
or in ~/.bashrc

alias ^H='stty erase ^H'
alias ^?='stty errase ^?'
That way, whenever the backspace key is confused you can type backspace as a command and it will fix itself.

[ Reply to This | # ]