Есть скрипт для одной сессии tmux'а:
#!/bin/bash
session_term="session_all"
tmux -2 new -d -s ${session_term}
echo ${session_term}
tmux select-window -t ${session_term}:1
tmux split-window -t ${session_term}:1 -h -p 50
tmux send-keys -t ${session_term}:1 'ncmpcpp' 'Enter'
tmux split-window -t ${session_term}:1 -v -p 50
tmux send-keys -t ${session_term}:1 'transmission-remote-cli' 'Enter'
tmux select-pane -t ${session_term}.1
tmux send-keys -t ${session_term}:1 'ranger' 'Enter'
tmux split-window -t ${session_term}:1 -v
tmux send-keys -t ${session_term}:1 'wvpn' 'Enter'
tmux split-window -t ${session_term}:1 -h
tmux send-keys -t ${session_term}:1 'pass' 'Enter'
tmux select-pane -t ${session_term}.2
tmux attach-session -t ${session_term}
Если запускать просто скрипт, то все работает как надо, я же запускаю командой:
termite -t all -e ~/.config/tmux/script.sh &
tmux split-window -t ${session_term}:1 -h