Comment 1 for bug 568306

Revision history for this message
Dustin Kirkland  (kirkland) wrote :

Hi Thierry-

So we've toyed with this in Byobu in a few releases in the past. Basically, the line written to $HOME/.profile by byobu-launcher-install was changed to:

-`echo $- | grep -qs i` && byobu-launcher
+`echo $- | grep -qs i` && exec byobu-launcher

However, if byobu-launcher (or byobu, or screen) crashes entirely, you're basically locked out interactive shells on your system. It doesn't happen very often, but every once in a while it does. Screen has an occasional segfault. Or byobu does something silly. This situation can be fixed by either logging in as root and fixing the situation (which isn't always possible in Ubuntu systems), or launching a non-interactive shell (also non-trivial).

However, I just tested the following by linking /bin/false to /usr/bin/byobu:

-`echo $- | grep -qs i` && byobu-launcher
+`echo $- | grep -qs i` && byobu-launcher && exit

This actually works really well. If byobu exit (or detach) succeeds, you log all the way out on detach. But if byobu (or screen) crashes, then you still get your shell.

Thanks for bringing this up, Thierry, I'll get a fix committed!

:-Dustin