What is the difference between screen-256 color and xterm-256color
Solution 1:
tmux
is a terminal emulator, since each pane must behave as a separate terminal; its emulation is not exactly the same as that of xterm
or gnome-terminal
, for historical reasons (it instead matches screen
, which predates most of the GUI terminal emulators). It therefore requires a different terminal description to behave properly.
Setting $TERM
manually is usually a bad idea specifically for this reason; it will usually be set correctly by itself, with some exceptions usually related to compatibility (older Solaris doesn't understand xterm-256color
, for example).