0

I have the following line in my /etc/rc.local file which starts up tmux under the user "myuser" on boot. But now I want to add in a new tab to this tmux instance. What do I need to modify in this line to have 2 tmux tabs open detached on boot?

/bin/su -l myuser -c "/usr/bin/tmux new-session -s mytab -d"

1 Answer 1

0

Either modify the command to add new-window:

/usr/bin/tmux new-session -s mytab -d \; new-window

Or create a .tmux.conf with your commands - tmux will run each command when it starts:

new-session -smytab -d
new-window

And change your command to:

/usr/bin/tmux start

Or create a separate config with the same and start tmux with:

/usr/bin/tmux source /path/to/myconfig

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .