I am looking for a brief comparison of the terminal types supported by iTerm2, mainly to see what setup to pick in order to minimize problems.

Mainly, I am connecting with Linux (Debian/Ubuntu) servers, using tmux a lot (scripted to be started by default on ssh).

Also I do use Midnight Commander most of the time and I do still encounter lots of problems related to ESCaping.

Here is the complete list:

  • vt100
  • xterm
  • xterm-new
  • xterm-256color
  • ansi
  • rxvt
  • linux

My current one is xterm-256color, but when I ssh remotely I observe that it becomes TERM=screen, probably because tmux usage.

Now, what should I use to avoid having problems with mc running in tmux, i want to be able to use mouse, simple escapes, and stop seeing weird characters appearing on screen (related to escapes, like OBOB)

1 Answer 1


Short bet, go for xterm-256color

The setting in iTerm2 affects two things: 1. How the TERM environment variable is initially set. Your login scripts are changing this if it gets set to screen (or you're using screen or tmux, which always set it to screen) 2. The "ansi" terminal automatically scrolls when the cursor is on the bottom right of the screen. You probably don't want this.

As for how the TERM var is interpreted by apps, that's complicated. Most people want xterm-256color unless they're sshing to a host that doesn't support it. In order of capability and support, I'd order them: xterm-256color xterm-new xterm vt100

I probably wouldn't use the others unless I had a really good reason to (they're carried over from the original iTerm code and may or may not work well).

Anyway, figure out why your TERM var is getting changed to screen and that's probably the cause of your trouble.

  • Yes, it's true that tmux will screen the terminal to screen and this may cause problems with some programs. Still, it's up to these programs to be fixes as there is nothing that you can to to prevent this behaviour.
    – sorin
    Commented May 8, 2014 at 10:45

You must log in to answer this question.

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