ubuntu - how to clear all session on byobu
2014-04
I want to clear all session at byobu.
Now it asks me which one I want to use:
nazar@nazar-desktop:~$ byobu
Byobu sessions...
1. tmux: 1: 69 windows (created Tue Feb 4 11:11:00 2014) [80x23]
2. tmux: 8: 1 windows (created Tue Feb 4 12:28:07 2014) [80x23]
3. tmux: 9: 1 windows (created Tue Feb 4 12:45:48 2014) [80x23]
4. Create a new Byobu session (tmux)
5. Run a shell without Byobu (/bin/bash)
I couldn't find any solution.
How to solve this issue?
byobu kill-server
Full disclosure: I am the author and maintainer of Byobu.
I set up byobu auto run with the command byobu-enable. It's great when I log in from terminal or ssh, but how can I make xterm attach to it automatically ? (mate-terminal from Linux mint especially)
There's two ways of doing this, actually.
- Byobu actually ships a graphical desktop icon and launcher. You should be able to find Byobu under Applications->Accessories in Gnome2, or just search for 'byobu' in a Unity or Gnome3 style launcher. It will use your desktop's default terminal application, and launch Byobu in it.
byobu-enable
adds a line to~/.profile
(which, generally speaking, is the best place for it. Alternatively, you could add this to~/.bashrc
instead:_byobu_sourced=1 . /usr/bin/byobu-launch
To do this with mate-terminal specifically you'll want to:
- Create a profile (in the mate-terminal app go to Edit=>Profiles...)
- Name the profile (eg. "foo")
- Set the profile to "Run a custom command instead of my shell" (and have it run byobu)
- Start mate-terminal with the extra arg --profile=foo (or whatever you named it)
- mate-terminal will start up with profile "foo", which will make it run byobu
Depending on the program (I don't know byobu) it may or may not exit immediately. If it does, I forget exactly how to fix it, but essentially you need to make a script that runs byobu instead, then runs bash, and have mate-terminal run that script instead. If you Google for something like "gnome-terminal profile run custom command exit" you should find more details.
Hope that helps.
* Edit *
I said "mate-terminal specifically" because mate-terminal has slightly different command line arguments than its predecessor (gnome-terminal). However, for any non-MATE users reading this, the same answer applies, you just need to do "man your-terminal" or "your-terminal --help" to find out the equivalent of "--profile" to use.
Not sure what is your exact use case but if you want to run byobu on start it is sufficient to press F9
and choose an option: