Name a Byobu session?
Byobu is simply a shell for the tmux (or screen) back end terminal multiplexor. You can therefore pass any command that your back end supports through Byobu.
Byobu with tmux back end
To start a new Byobu session with a specified name:
byobu new -s <session-name>
To change the name of a pre-existing session:
byobu rename -t <session-name> <new-session-name>
Byobu with screen back end
To start a new Byobu session with a specified name:
byobu -S <session-name>
To change the name of a pre-existing session:
byobu -X <session-name> <new-session-name>
Note: All credit to J.F.Sabastian for his help. I've now verified the above commands are correct for both Tmux and Screen backed Byobu.
Related videos on Youtube
Ashimema
Computer Hobbyist turned Professorial who also happens to enjoy the great outdoors! You'll often find my tapping away at my keyboard late into the evenings, but during the daylight hours of the weekend, you're better looking for me at the local river because I'll probably be in my kayak! Got fed up with the trolling in this community so is moving on.
Updated on September 18, 2022Comments
-
Ashimema almost 2 years
Is there a way to create identifiable Byobu sessions so that when I've got multiple sessions running, the byobu-select-session menu gives me a list of sessions I can recognize, as opposed to non-descript tmux port numbers?
In an ideal world, it would be great to be able to both start a session giving it a name and to modify such a session to change a name if it's already running? Is this possible, how?
Edit 1: Some further details:
- I'm using tmux as the backend and don't especially want to switch back to screen.
- I've now tried starting a session with
byobu -S "Name"
to no avail :-(
Edit 2: Some discoveries:
- I've now discovered a partial answer in using tmux native commands:
tmux rename-session <current-name> <new-name>
renames an existing session andtmux new -s session_name
creates a new names session. I'm surprisedbyobu -S "name"
isn't liked totmux new -s session_name
for byobu with a tmux backend.
-
jfs over 11 yearshave you tried:
byobu -S your-session-name
? See how to run multiple byobu sessions at once?. I don't know whether it works if byobu uses tmux instead of screen. -
Ashimema over 11 yearsThanks for the suggestion, I've now tried
byobu -S
to no avail. It appears to work with tmux as the backend... Is there anything similar for tmux? -
jfs over 11 years
byobu new -s your-session-name
might work for tmux backend. -
Ashimema over 11 yearsYour a star @J.F.Sebastian , that did the trick. You can even rename a session using
byobu rename-session -t <original_name> <new_name>
. -
guntbert over 11 years@J.F.Sebastian Your comment seems to be the correct answer - if you post that as answer and Ashimema accepts it then we all benefit from having another answered question.
-
jfs over 11 years@guntbert: I don't use tmux. It is better to post tested answers. It is OK to ask and answer your own question i.e., Ashimema can post and accept his own answer.
-
JohnMerlino over 10 yearsThis works with tmux but not gnu screen