I want to avoid wasting time doing my startup ritual by having the following done automatically:
- Open up a new terminal
- Run byobu
- Split horizontally, then split the two new panes vertically (or vice versa)
- Run specific commands for each pane
I'm guessing it will be something along these lines:
gnome-terminal --full-screen -- byobu -S MainSession
byobu-tmux select-pane -t 0
byobu-tmux split-window -v
byobu-tmux select-pane -t 1
byobu-tmux split-window -h
byobu-tmux select-pane -t 0
byobu-tmux split-window -h
byobu-tmux select-pane -t 1
byobu-tmux send-keys "COMMAND"
byobu-tmux select-pane -t 2
byobu-tmux send-keys "COMMAND"
byobu-tmux select-pane -t 3
byobu-tmux send-keys "COMMAND"
byobu-tmux select-pane -t 0
First line on its own would open a new fullscreen terminal and pass the new byobu session command to it. However, I don't know how to connect the rest of the script together. If I put an opening quote before byobu, separate all the commands with ;, and put a closing quote at the end of the script, I get the terminal opened up without byobu, and an error: "Failed to execute child process (No such file or directory)".
In addition, how can I get the terminal opened on a specific monitor? According to gnome-control-center, the monitor I want this to open on is number 3.
Took me a while to figure it out, so if anyone needs a startup script to open up multiple byobu sessions, use and modify as you like:
Save this with your preferred text editor, run sudo chmod +x on the file, and add it to whatever startup list you use.