Take the 2-minute tour ×
Ask Ubuntu is a question and answer site for Ubuntu users and developers. It's 100% free, no registration required.

I am using ubuntu gnome 14.04 and I want to have tmux and zsh opened when I start a new terminal.

For now, in my preference of the terminal, I run tmux by default.

In the ~/.tmux.conf file I have this :

set-option -g default-shell /bin/zsh

It works but I have a problem with colors so I need to use TERM=xterm-256color tmux to run tmux. I tried to replace the command launched by default but it produce this error : no such file of this type.

I tried to run zsh by default and I added this in my ~/.zshrc :

if [ "$TMUX" = "" ]; then TERM=xterm-256color tmux; fi

It works but it launch zsh then it launch another process with zsh again. It's not very clean and when I try to close the terminal, it say than I have an active process running.

What can I do to make it work?

share|improve this question
add comment

1 Answer 1

up vote 1 down vote accepted

Usually tmux should get the TERM parameter from your terminal emulator. So you could just set it to xterm-256color in your its configuration.

If this does not work for some reason, you can start tmux like that

tmux -2

The parameter -2 forces tmux to assume 256-color support. Additionally you can set default-terminal in your `~/.tmux.conf

set -g default-terminal "screen-256color"
share|improve this answer
    
tmux -2 works. I already had set -g default-terminal "screen-256color" in my ~/.tmux.conf. –  Dougui Apr 28 at 10:00
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

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