If I log in to my Ubuntu box over SSH from my MacOSX terminal, then start screen, my backspace-key doesn’t work anymore. Pressing it deletes the first character on the right of the cursor, instead of the one on the left. This only happens inside screen, not on the regular bash-shell.

I found different workarounds:

  • A forum post telling to change the terminal preferences to send backspase as CTRL-H (ASCII 0x08) instead of the normal ASCII 0x7f.
  • A blogpost telling to lie about the terminal you’re using: “TERM=screen screen”
  • Another blog telling to do remapping inside screen with bindkey-commands

None of the above worked without side-effects: CTRL-H is not understood by MacOSX terminal applications; bindkey-commands are applied even if I SSH from my linux box.

The solution I like best is to change the terminal from the standard “xterm-color” to “rxvt”. After this change, everything worked like a charm.

3 Comments

  1. Christophe Vandeplas says:

    when I ssh to my linux box, and enter screen, everything indeed works like a charm.

    But my ‘vi’ is still confused… how do you solve that?

  2. Niobos says:

    I just tried this, but ‘vi’ works fine, both inside screen and straight from bash.
    What exactly does not work?

  3. Josep says:

    It works !! Thank you very much.