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

database - VFP Grid + SQL server 2008 - grid not showing correctly -

jquery - Set jPicker field to empty value -

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