Discussion:
2 different TERMS
(too old to reply)
Elimar Riesebieter
2015-03-29 08:20:31 UTC
Permalink
Hi all,

how do I manage to run tmux on screen-256color in urxvt|xterm
and on screen in a vt aka tty ($TERM=linux)?

set-option -g default-terminal screen-256color
is set but this isn't usefull on a tty while i.e. vim is used to run
from the term variable.

I didn't found an if instruction or something like that for
tmux.conf.

Thanks in advance
Elimar
--
We all know Linux is great... it does infinite loops in 5 seconds.
-Linus Torvalds
Elimar Riesebieter
2015-03-29 09:52:06 UTC
Permalink
Post by Elimar Riesebieter
Hi all,
how do I manage to run tmux on screen-256color in urxvt|xterm
and on screen in a vt aka tty ($TERM=linux)?
set-option -g default-terminal screen-256color
is set but this isn't usefull on a tty while i.e. vim is used to run
from the term variable.
I didn't found an if instruction or something like that for
tmux.conf.
Workaround in zsh:

# run tmux for different TERMS
if [[ "$TERM" == "linux" ]]
then
alias tmux='tmux -f $HOME/.tmux8.conf'
else
alias tmux='tmux -f $HOME/.tmux256.conf'
fi

Well this needs to be optimized to check first whether a tmux-server
runs. If tmux runs in urxvt and I try to open a second one on a vt
it grabs the term definition from the running urxvt session...

new-session didn't help here.

Elimar
--
Do you smell something burning or is it me?
Nicholas Marriott
2015-03-29 11:08:28 UTC
Permalink
If you use different sessions for console and X, set default-terminal
differently for each (use set-option without -g).

If you use the same session you will need to pick one (screen or
screen-256color) and live with it, or change it when you attach.
Post by Elimar Riesebieter
Post by Elimar Riesebieter
Hi all,
how do I manage to run tmux on screen-256color in urxvt|xterm
and on screen in a vt aka tty ($TERM=linux)?
set-option -g default-terminal screen-256color
is set but this isn't usefull on a tty while i.e. vim is used to run
from the term variable.
I didn't found an if instruction or something like that for
tmux.conf.
# run tmux for different TERMS
if [[ "$TERM" == "linux" ]]
then
alias tmux='tmux -f $HOME/.tmux8.conf'
else
alias tmux='tmux -f $HOME/.tmux256.conf'
fi
Well this needs to be optimized to check first whether a tmux-server
runs. If tmux runs in urxvt and I try to open a second one on a vt
it grabs the term definition from the running urxvt session...
new-session didn't help here.
Elimar
--
Do you smell something burning or is it me?
------------------------------------------------------------------------------
Dive into the World of Parallel Programming The Go Parallel Website, sponsored
by Intel and developed in partnership with Slashdot Media, is your hub for all
things parallel software development, from weekly thought leadership blogs to
news, videos, case studies, tutorials and more. Take a look and join the
conversation now. http://goparallel.sourceforge.net/
_______________________________________________
tmux-users mailing list
https://lists.sourceforge.net/lists/listinfo/tmux-users
Loading...