I use the following tmux code in a script file tmux-dev.sh and add it to bash using bash /home/rohit/tmux-dev.sh :
tmux new-session -d
tmux split-window -h
tmux split-window -v
tmux -2 attach-session -d
The script causes a nesting of tmux panes giving error: pane too small.
To my surprise , the same bash tmux-dev.sh when put into the title and command box of gnome-terminal it works perfectly fine and gives this screen

Please help me out with this.I am using ubuntu 14.10.
P.S-- Please stay away from suggesting any tools , I am here for an explanation for this behavior and raw shell script solution.
bashrc. I'm not experienced withtmux, but might it be that every new session starts its own bash shell and thus calls.bashrcagain making it basically an endless loop? – FelixJN Aug 20 '15 at 08:42bashrcto check if you are NOT in atmuxsession before running the script:if [ ! tmux session ] ; then bash tmux-dev.sh ; fi. See here for an example check. – FelixJN Aug 20 '15 at 09:15