I think your best option is to use tmux to do the job. Here is just a quick example and a step-by-step explanation for this. Here I use only vertical splits, which can be confusing, you should read in the tmux man page to see how to select-panels .
- First create a new tmux session in separate mode
- Then send the appropriate command to start your first program
- Create a new vertical delimiter
- Send the appropriate command to start the second program
- etc.
tmux new-session -d -s foo
tmux send-keys -t foo 'optirun yarpserver' Enter
tmux split-window -v -t foo
tmux send-keys -t foo 'optirun iCub_SIM' Enter
tmux split-window -v -t foo
tmux send-keys -t foo 'optirun simCartesianControl' Enter
tmux split-window -v -t foo
tmux send-keys -t foo 'optirun iKinCartesianSolver --context simCartesianControl / conf --part left_arm' Enter
Hope this helps you.
source share