I have a script I want to run where I would start up two programs running inside of separate tmux sessions. The script I have now is pretty much:
!/bin/bash
tmux new -s test1 'mono --debug program1.exe'
tmux new -s test2 'python program2.py'
The problem I am having is the 2 programs are running in debug mode so they are actively outputting information to the tmux session. I'm not able to gain control to type anything into the tmux session after starting the program. I can however manually detach the session using the Ctrl + b d
method. I'm not sure how to go about doing that in a bash script though.
I found the tmux detach
command but since I am not sure how to type into the session after the program has started and debug information is being output I have no way of entering that command.
I also found one post that was saying there is a -d
flag you can use for tmux that will start a session detached and I was hoping I could do something like tmux new -d test1 'mono --debug program1.exe'
but that didn't seem to work. It seemed to complain about syntax in the -d
flag.