1

running tmux automatically when xterm is launched: what is the most elegant/correct solution?

view story
linux-howto

http://serverfault.com – I am trying to setup my workstation in such a way that tmux is run for each terminal (xterm, gnome-terminal, ...) that is launched. I was thinking to add tmux to the .bashrc; problem is that if I launch bash twice for whatever reason, it start a second tmux inside the current tmux. So: is there a way to detect, maybe from the .bashrc, that the current bash is the 'first' one and not a second one launched in the same terminal? any other good ideas / best practices / bash design patterns that can be applied to this problem? (HowTos)