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.