From 8bd62d6ca3c93a504b86bed249bcc0745ecd9e2c Mon Sep 17 00:00:00 2001 From: Chow Loong Jin Date: Fri, 24 Jul 2009 18:39:20 +0800 Subject: [PATCH] Check $STY rather than $TERM when determining whether screen is running --- byobu | 2 +- byobu-launcher | 2 +- byobu-select-profile | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/byobu b/byobu index b46f8cb9..a67ac010 100755 --- a/byobu +++ b/byobu @@ -28,7 +28,7 @@ if [ "$1" = "-v" ]; then fi # Nesting byobu inside of screen doesn't work well -if [ ! -z "$STY" ]; then +if [ ! -z $STY ]; then echo `gettext "Exit the current screen session to run $PKG"` exit 1 fi diff --git a/byobu-launcher b/byobu-launcher index a05bdb05..32dd29b3 100755 --- a/byobu-launcher +++ b/byobu-launcher @@ -18,7 +18,7 @@ # You should have received a copy of the GNU General Public License # along with this program. If not, see . -[ "$TERM" = "screen" ] && exit 0 +[ -z $STY ] || exit 0 out=`screen -ls 2>/dev/null` || true if echo "$out" | grep -qsi "^No Sockets found in "; then diff --git a/byobu-select-profile b/byobu-select-profile index 5ddd8361..f175d379 100755 --- a/byobu-select-profile +++ b/byobu-select-profile @@ -130,7 +130,7 @@ setprofile() { ln -s "$PROFILE_DIR/$x" "$HOME/.$PKG/profile" found=1 echo - if [ "$TERM" = "screen" ]; then + if [ ! -z $STY ]; then echo `gettext 'If you are using the default set of keybindings, press\n to activate these changes.\n\nOtherwise, exit this screen session and start a new one.'` else echo `gettext 'Run "byobu" to activate'`