0

If I do not use tmux my terminal is the following:

~$ echo $TERM
xterm

If I use tmux by adding the following into .bashr

# tmux configuration
tmux attach &> /dev/null

if [[ ! $TERM =~ screen ]]; then
    exec tmux
fi

My .tmux.conf has a line set-option -g default-terminal "screen-256color", but the terminal is the following:

~$ echo $TERM
screen

This makes VIM ugly. How can I get the tmux to use screen-256color? Using gnome terminal on Ubuntu 14.02

chaos
  • 48,171

2 Answers2

1

I do have the same problem (my set-option -g default-terminal "screen-256color" seems useless).

So, whenever I need 256 colors, I use tmux -2 to force it.

That ain't the solution, just a workaround.

apaul
  • 3,378
1

Ubuntu 14.02 uses tmux version 1.8, apperently it does not support screen-256color, so to resolve I followed this advice:

https://stackoverflow.com/questions/25940944/ugrade-tmux-from-1-8-to-1-9-on-ubuntu-14-04

So:

~$ tmux -V
tmux 1.9a
~$ echo $TERM
screen-256color

And now everything works right.