0

This question already has an answer here:

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

marked as duplicate by Gilles, slm May 6 '15 at 22:50

This question has been asked before and already has an answer. If those answers do not fully address your question, please ask a new question.

0

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.

  • Found the answer for my sistem, what version of tmux are you using? tmux -V – user1135541 May 6 '15 at 17:25
  • @user1135541 thanks, I'm using 1.6, maybe that's the problem... – apaul May 6 '15 at 17:37
0

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.

Not the answer you're looking for? Browse other questions tagged or ask your own question.