diff --git a/byobu b/byobu
index a67ac010..1b3c7166 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 [ -n "$STY" ]; then
echo `gettext "Exit the current screen session to run $PKG"`
exit 1
fi
diff --git a/byobu-launcher b/byobu-launcher
index 32dd29b3..374edbcb 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 .
-[ -z $STY ] || 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 f175d379..005a7699 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 [ ! -z $STY ]; then
+ if [ -n "$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'`
diff --git a/debian/changelog b/debian/changelog
index bda1754f..cb579156 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -1,8 +1,12 @@
byobu (2.24) unreleased; urgency=low
- * UNRELEASED
+ [ Chow Loong Jin and Dustin Kirkland ]
+ * byobu, byobu-launcher, byobu-select-profile: check $STY rather than
+ $TERM, to determine if we're already inside of a screen session, per
+ screen's manpage; wrap $STY in double quotes; use -n rather than -z
- -- Dustin Kirkland Wed, 22 Jul 2009 21:37:46 -0500
+
+ -- Dustin Kirkland Fri, 24 Jul 2009 08:27:24 -0500
byobu (2.23-0ubuntu1) karmic; urgency=low