Setup: OSX 10.6 Terminal.app with multiple tabs, one of which ssh's into a machine that has a running GNU Screen instance. That screen instance has (among other things) and irssi session, bash shells. (other details: my screen key is ^-o)

How can I make sure everything works 'right'

Among the problems I have seen:

  • tab, delete, others causing 'Wuff--Wuff', fixed by setting term=screen during the initial screen creation (http://droptips.com/wuff-wuff-from-mac-os-x-to-a-screen-session-on-linux)

  • up and down arrows, not working right within irssi (fixed by option cursor down to \033[6~ in Terminal.app > keyboard)

  • when $TERM is set to 'screen' my screen bar loses color... fixed by adding 'export TERM=xterm-color' to .bashrc on the foreign machines.

In short, it feels like a hydra! Every time I fix something, something new comes up! What is the 'right' solution for all this? Switch to iTerm.app?

I would like

  • all the keys to work in the 'normal' way... as they would in say 'putty' or similar, including during less and the like.
  • all the window sizes to work right. 'reset' and screen '^-a W' should Do The Right Thing.

1 Answer 1


Sorry to answer my own, but no help seems forthcoming :)

Terminal > settings > advanced > declare as 'dtterm' 

seems to be a good solution. Or at least more consistently better than xterm-color, or TERM=screen.

With this, all four arrow keys and backspace work in Vim, Less.

Still broken: ctrl-a-[ (gnu screen buffer) up and down seem borked, alas.


You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .