Thursday, May 9, 2024
 Popular · Latest · Hot · Upcoming
9
rated 0 times [  9] [ 0]  / answers: 1 / hits: 14634  / 2 Years ago, sat, august 6, 2022, 9:58:57

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?


More From » zsh

 Answers
4

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"

[#25622] Sunday, August 7, 2022, 2 Years  [reply] [flag answer]
Only authorized users can answer the question. Please sign in first, or register a free account.
llianconclad

Total Points: 65
Total Questions: 109
Total Answers: 127

Location: Mali
Member since Fri, Dec 3, 2021
2 Years ago
llianconclad questions
Sun, May 1, 22, 08:47, 2 Years ago
Tue, Nov 8, 22, 02:33, 2 Years ago
Mon, Aug 23, 21, 15:58, 3 Years ago
Sun, Jul 25, 21, 18:19, 3 Years ago
;