diff --git a/debian/changelog b/debian/changelog index 61a09f21..fe6f8adc 100644 --- a/debian/changelog +++ b/debian/changelog @@ -24,6 +24,8 @@ byobu (5.3) unreleased; urgency=low rather than one or the other * etc/profile.d/Z97-byobu.sh: - support LC_TERMTYPE=[byobu|byobu-screen|byobu-tmux] + * etc/profile.d/Z97-byobu.sh, usr/bin/byobu-launcher: LP: #897711 + - allow nesting, if LC_BYOBU > 1 [ Dustin Kirkland and Ryan Thompson ] * usr/bin/byobu-reconnect-sockets, usr/bin/byobu-select-session: LP: #908944 diff --git a/etc/profile.d/Z97-byobu.sh b/etc/profile.d/Z97-byobu.sh index fbd16698..4990be77 100755 --- a/etc/profile.d/Z97-byobu.sh +++ b/etc/profile.d/Z97-byobu.sh @@ -20,7 +20,7 @@ # Apologies for borrowing the LC_BYOBU namespace, but: # a) it's reasonable to assume that no one else is using LC_BYOBU # b) LC_* is sent and receieved by most /etc/ssh/ssh*_config -if [ "$LC_BYOBU" = "1" ] && [ -r "/usr/bin/byobu-launch" ]; then +if [ -n "$LC_BYOBU" ] && [ "$LC_BYOBU" -gt 0 ] && [ -r "/usr/bin/byobu-launch" ]; then . /usr/bin/byobu-launch elif [ "$LC_TERMTYPE" = "byobu" ] && [ -r "/usr/bin/byobu-launch" ]; then . /usr/bin/byobu-launch diff --git a/usr/bin/byobu-launcher b/usr/bin/byobu-launcher index 0eeec21e..1db34474 100755 --- a/usr/bin/byobu-launcher +++ b/usr/bin/byobu-launcher @@ -29,9 +29,13 @@ if [ -O "$HOME" ]; then else case "$TERM" in *screen*) - # Handle nesting (silence this message, as some users found it noisy?) - # printf "$(gettext 'To launch in a nested session, run: byobu')\n" - true + # Handle nesting + if [ -n "$LC_BYOBU" ] && [ "$LC_BYOBU" -gt 1 ]; then + # LC_BYOBU > 1, so user explicitly wants nested sessions + exec $BYOBU_PREFIX/bin/byobu "$@" + else + true + fi ;; dumb) # Dumb terminal, don't launch