11

Possible Duplicate:
Getting 256 colors to work in tmux

I want to set my terminal to 256 colors. I normally use the Gnome terminal which is shipped by default in Ubuntu but I also downloaded Terminator and tried Xterm and all them return 8 when I call tput color inside Tmux.

How can I arrange to have 256 colors in Tmux inside Gnome terminal so I can use Vim's 256-color scheme?

2 Answers2

3

Even though OP answered the question in the above comments, I'll add the details here for easy reference. The quick solution is to add the following to your .tmux.conf file:

set -g default-terminal screen-256color

For more detailed info, check out the Tmux page on ArchWiki, or this helpful answer to the same question.

  • 2
    It seems that having active sessions prevents new sessions from honouring the default-terminal option in .tmux.conf as well as passing -2 as a parameter to tmux. Killing all sessions seemed to solve this for me. – Matijs Jun 30 '14 at 13:43
  • This doesn't work for me. Neither does using xterm instead of screen work. – trusktr Jul 17 '14 at 02:16
2

There is also the -2 command line option for tmux - c.f. older question

peterph
  • 30,838