Currently I don't seem able to run multiple sessions of byobu
. After the initial byobu instance, running on one terminal, when I run byobu
in another terminal it always attaches to the first byobu
session.
Is there away to start independent byobu
sessions?
It is very easy. (At least on my ubuntu 10.04 machine, where byobu uses screen.);
If you already have one session running, and do not want to reattach but instad create a new one, just type:
Where my-other-session is how you are naming the new session.
Later, if you have already more than one byobu sessions running, it is sufficient to type
And you will be presented with a list of running sessions to choose from:
If typing
byobu
dos not present a list of running sessions to choose from, try thebyobu-select-session
command.The pts-2.mit session was the one I created initially without giving it a name, so the name was chosen by boybu.
If you want to find out which sessions are running, without attaching to any of them, use
It drops you again at the console where you typed it after showing a list like:
Use the
-S
option to give your next byobu session (e.g. its socket) a different name. Without-S "MYNAME"
the socket would be<pid>.<tty>.<host>
instead of<pid>.MYNAME
.As far as I can work out, if you run
byobu
with no arguments then it reattaches to an existing session (or starts a new one if you aren't runningbyobu
at all). If you run it with a program name as the argument then it will pass this to eitherscreen
ortmux
, depending on what you are running inside.If you're running
screen
, you can simulate starting a fresh session (executing your shell) by runningbyobu byobu-shell
(byobu-shell
being the program thatbyobu
launches by defualt. It prints the MOTD and launches your$shell
.). Then when you try to reattach, either by runningbyobu
or reconnecting via SSH to the server, you'll be given a menu with options to choose between the runningbyobu
sessions.For
tmux
, executebyobu new-session
to achieve this. The next time you reconnect you'll be attached to the last session you started.If you're connecting to a machine using ssh and you'd like to create a new byobu session, use:
Note: The
-t
flag is needed to "Force pseudo-terminal allocation" otherwise you get the following error: "open terminal failed: not a terminal"Once you have created the new session on a machine on any subsequent connection you'll be asked which byobu session you'd like to attach to.
Or, when you are inside a byobu session already: Ctrl+Shift+F12.