ubuntu - how to clear all session on byobu

05
2014-04
  • nazar_art

    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?

  • Answers
  • Dustin Kirkland
    byobu kill-server
    

    Full disclosure: I am the author and maintainer of Byobu.


  • Related Question

    linux - How can I run byobu from xterm at starting?
  • Walkman

    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)


  • Related Answers
  • Dustin Kirkland

    There's two ways of doing this, actually.

    1. 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.
    2. 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

  • machineghost

    To do this with mate-terminal specifically you'll want to:

    1. Create a profile (in the mate-terminal app go to Edit=>Profiles...)
    2. Name the profile (eg. "foo")
    3. Set the profile to "Run a custom command instead of my shell" (and have it run byobu)
    4. Start mate-terminal with the extra arg --profile=foo (or whatever you named it)
    5. 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.

  • Michal Stefanow

    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:

    enter image description here