Hi Thomas,

thanks for your reply.
My problem is i don't know how to specify an id when automatically creating my pane since i use a command send-keys to create my new pane.
Indeed, i did not find a new-pane command (similar to new-window).


2012/12/27 Thomas Adam <thomas@xteddy.org>


Look at the FORMATS section in the tmux man page, there's a variable for the count of panes per window.

On Dec 27, 2012 8:12 AM, "El Spliffo" <el.spliffo@laposte.net> wrote:
Hi everybody,

i made a script to open automatically my SSH sessions in a few windows/panes, here it is :
tmux new-session -d -s hawkhost

tmux new-window -t hawkhost:1 -n 'VPN' 'ssh ovpn@'
tmux new-window -t hawkhost:2 -n 'Halo' 'ssh root@'
tmux new-window -t hawkhost:3 -n 'Backup-Halo' 'ssh infra@'
tmux new-window -t hawkhost:4 -n 'Bdd' 'ssh ht@'
tmux new-window -t hawkhost:5 -n 'DNS' 'ssh -p 2222 ht@'
tmux new-window -t hawkhost:6 -n 'Ar' 'ssh root@'
tmux new-window -t hawkhost:7 -n 'Srvdmz' 'ssh root@'
tmux split-window -h -t hawkhost:6 'ssh root@'
tmux send-keys -t hawkhost:6.0 '/root/script.sh' C-m
tmux send-keys -t hawkhost:6.1 '/root/script.sh' C-m
tmux select-window -t hawkhost:0
tmux -2 attach-session -t hawkhost
This script is very handy and it allows me to retrieve all my sessions histories as soon as the tmux process on the server does not end.

My only problem is that the split-window command re-splits my already split panes, this is not done by the new-window command. Is it possible to avoid this (if a pane is already split, do not split it on more time, maybe this should require an id) ?

Thanks very much for any help !

Master Visual Studio, SharePoint, SQL, ASP.NET, C# 2012, HTML5, CSS,
MVC, Windows 8 Apps, JavaScript and much more. Keep your skills current
with LearnDevNow - 3,200 step-by-step video tutorials by Microsoft
MVPs and experts. ON SALE this month only -- learn more at:
tmux-users mailing list