22

One of the windows within my byobu session mysteriously stops receiving keystrokes. I can open new windows, but that particular window just hangs.

So now, every time I invoked byobu, I see 3 windows: 2 that I'm actually using, plus that 1 window that just sits there.

Is there a way to kill that wayward window? Preferably, just that one window. But if I need to clear the whole session, is also alright.

pepoluan
  • 1,332

4 Answers4

31

Ctrl-a + k kills the currently focused window after a y/n confirmation in screen/byobu.

Kevin Panko
  • 7,466
23

You can use Byobu's hotkey, Ctrl-F6 to force-kill windows or panes.

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

6

If you are using byobu in Emacs mode, meaning that Ctrl-a is mapped to "start of the line" you can use F12+k instead. F12 always works as the tmux/screen escape.

You will be prompted with a yes/no option from there.

0

Finally, I resorted to this helpful answer on StackOverflow, i.e.:

screen -ls | grep "Detached" | awk '{print $1}' | xargs -i screen -X -S {} quit

(Of course, I did it manually, screen -ls followed by screen -X -S $screen_session quit)

pepoluan
  • 1,332