diff --git a/byobu b/byobu index c537ddf3..97a2b5ed 100755 --- a/byobu +++ b/byobu @@ -28,7 +28,7 @@ if [ "$1" = "-v" ]; then fi # Nesting byobu inside of screen doesn't work well -if [ -n "$STY" ]; then +if [ -n "$STY" ] || [ "$TERM" = "screen-bce" ]; then echo `gettext "Exit the current screen session to run $PKG"` exit 1 fi @@ -40,7 +40,6 @@ byobu-janitor --force printf "\033]0;${USER}@$(hostname) - ${PKG}\007" # Launch motd+shell, unless the user has default windows set to launch -[ -n "$SHELL" ] || SHELL="/bin/sh" [ -x "$SHELL" ] || SHELL="/bin/sh" DEFAULT_WINDOW="$SHELL -c motd+shell" grep -qs "^[^#]" "$HOME/.$PKG/windows" && DEFAULT_WINDOW= diff --git a/byobu-launcher b/byobu-launcher index f375b550..b29a4970 100755 --- a/byobu-launcher +++ b/byobu-launcher @@ -18,17 +18,18 @@ # You should have received a copy of the GNU General Public License # along with this program. If not, see . +PKG="byobu" + # Make sure that we're not already in a screen session [ -z "$STY" ] || exit 0 -case "$TERM" in - *screen*) exit 0 ;; -esac +[ "$TERM" = "screen-bce" ] && exit 0 out=`screen -ls 2>/dev/null` || true if echo "$out" | grep -qsi "^No Sockets found in "; then - # Start new byobu session - exec byobu + # Start new session + exec $PKG else - # Re-attach to an existing session + # Set window title and re-attach to an existing session + printf "\033]0;${USER}@$(hostname) - ${PKG}\007" exec screen -xRR fi diff --git a/debian/changelog b/debian/changelog index ee79b9b3..2284707d 100644 --- a/debian/changelog +++ b/debian/changelog @@ -1,10 +1,15 @@ byobu (2.30) unreleased; urgency=low - * byobu-launcher: make sure that we're not already in a screen session - before launching or re-attaching byobu; it seems that $STY is not - quite enough, must also check $TERM + * byobu-launcher: + - it seems that checking $STY is not totally sufficient for + determining if we're already in a screen session; additionally + check that TERM != screen-bce + - set window title before we attach to an existing session + * byobu: + - test TERM against screen-bce here too + - checking that $SHELL is executable covers -n too - -- Dustin Kirkland Fri, 28 Aug 2009 10:53:03 -0500 + -- Dustin Kirkland Fri, 28 Aug 2009 11:01:24 -0500 byobu (2.29-0ubuntu1) karmic; urgency=low