bash - How to launch tmux with pre-opened second window and execute commands? -


there's possible duplicate it's closed , unanswered.

as i'm using chef automation, nice automate tmux launch pre-launched python web server , second window opened. (this development environment). , way of doing specifying parameters command line.

commands want execute in window title "daemon":

source bin/activate cd project debug=1 python app.py 

i'm unable find command line parameters allows pre-execute commands when launching tmux, , open more windows on launch.

you want create session without attaching (using -d option), can send additional tmux commands open second window before attaching.

tmux new-session -t mysession -d 'source bin/activate; cd project; debug=1 python app.py' tmux new-window -t mysession tmux attach-session -t mysession 

Comments

Popular posts from this blog

.htaccess - htaccess convert request to clean url and add slash at the end of the url -

C# random value from dictionary and tuple -

algorithm - Testing tetrahedron-triangle intersection -