Fixing backspace in screen in Terminal on OS X
Some title, eh? The problem is this: When using screen on a remote host in Terminal on OS X, backspace doesn’t work. Highly irritating. Here’s the solution. In the terminal, run:
defaults write com.apple.Terminal TermCapString xterm
And you’re all set.

May 30th, 2006 at 12:38 pm
[...] The biggest problem turned out to be backspace. It didn’t work at all when using screen on a remote host. Luckily Google pointed me here. The solution was to type a somewhat cryptic command in Terminal - certainly something I didn’t expect OS X to require me to do! [...]
June 26th, 2006 at 1:02 am
I spent way too long looking for a fix for this… I had this same problem on osx but while using “aterm” instead of terminal. This page helped me figure it all out though. If you’re using a terminal other than “Terminal.app,” this is what you do:
export TERM=xterm
You can put that in your .bashrc, .zshrc, or whatever you use.
February 1st, 2007 at 10:40 am
Thanx for the tip! You we’re my saviour !
February 24th, 2007 at 12:23 pm
Works great! Thank you!
April 2nd, 2007 at 7:29 am
I love you. Really. Can’t believe how long I’ve been looking for a solution for this problem + how simple the actual solution is… Thanks.
I will now go and delete heaps of characters.
July 2nd, 2007 at 5:33 am
Cool, export TERM=xterm works for me, OSX, using terminal.app sshing to a remote server and running screen there.
October 12th, 2007 at 12:58 pm
This is just wonderful! I tried tons of different terminal applications and none of them worked out of the box.
August 8th, 2008 at 6:04 pm
Damned, it works :)
i think to change many thinks…but not this TERM environnment variable !
August 9th, 2008 at 11:41 am
Erm, since the modificaiton, see that Backspace produce ^? on such ssh remote shell. After a while, Terminal/Preferences, changing type of terminal to “rxvt” rocks for me perfectly (vi, ssh, screen, …)