terminalzshtmuxrxvt256color

Automatically starting tmux after rxvt


I want to automatically run tmux after starting a rxvt terminal.

I used to do this by invoking tmux in my ~/.zshrc but this had the problem of having to hit ^D twice when I wanted to close my terminal.

I tried using rxvt -e tmux and rxvt -e zsh -c tmux to start tmux after starting rxvt which works. The problem with this method is that I then don't get 256 color support in my terminal.

Any suggestions?


Solution

  • I think you'll need

    tmux -2
    

    See man tmux:

    -2 Force tmux to assume the terminal supports 256 colours.