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.

9 Responses to “Fixing backspace in screen in Terminal on OS X”

  1. Tweaking Terminal - Macified Says:

    [...] 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! [...]

  2. ted Says:

    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.

  3. domi235 Says:

    Thanx for the tip! You we’re my saviour !

  4. Albert Peschar Says:

    Works great! Thank you!

  5. arne Says:

    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.

  6. Matt Says:

    Cool, export TERM=xterm works for me, OSX, using terminal.app sshing to a remote server and running screen there.

  7. Mikko Ohtamaa Says:

    This is just wonderful! I tried tons of different terminal applications and none of them worked out of the box.

  8. Gui Says:

    Damned, it works :)
    i think to change many thinks…but not this TERM environnment variable !

  9. Gui Says:

    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, …)

Leave a Reply