From 23438453b6caa1828b8b2b422278075d9e38313f Mon Sep 17 00:00:00 2001 From: Dustin Kirkland Date: Wed, 10 Jun 2009 14:18:57 -0500 Subject: [PATCH] * byobu: don't create an extra shell, if the user has some default windows specified Signed-off-by: Dustin Kirkland --- byobu | 9 ++++++++- debian/changelog | 5 +++-- 2 files changed, 11 insertions(+), 3 deletions(-) diff --git a/byobu b/byobu index 1f457481..ae57529a 100755 --- a/byobu +++ b/byobu @@ -88,6 +88,13 @@ sed -i "s/$OLDPKG/$PKG/g" "$HOME/.$PKG/keybindings" # Ensure that their default windows are seeded [ -r "$HOME/.$PKG/windows" ] || touch "$HOME/.$PKG/windows" +if grep -qs "^[^#]" "$HOME/.$PKG/windows"; then + # User has some default windows, so don't launch motd+shell + DEFAULT_WINDOW= +else + # User has no default windows, so launch motd+shell + DEFAULT_WINDOW="$SHELL /usr/bin/motd+shell" +fi # Ensure that the user's $SCREENRC at least exists [ -r "$SCREENRC" ] || touch "$SCREENRC" @@ -95,7 +102,7 @@ sed -i "s/$OLDPKG/$PKG/g" "$HOME/.$PKG/keybindings" # Now let's execute screen! if [ "$#" = "0" ]; then [ -n "$SHELL" -a -x "$SHELL" ] || SHELL="/bin/sh" - exec $SCREEN_REAL -c "/usr/share/$PKG/profiles/byoburc" $SHELL /usr/bin/motd+shell + exec $SCREEN_REAL -c "/usr/share/$PKG/profiles/byoburc" $DEFAULT_WINDOW else exec $SCREEN_REAL -c "$HOME/.$PKG/profile" "$@" fi diff --git a/debian/changelog b/debian/changelog index d38f1626..54d9435f 100644 --- a/debian/changelog +++ b/debian/changelog @@ -1,8 +1,9 @@ byobu (2.10) unreleased; urgency=low - * UNRELEASED + * byobu: don't create an extra shell, if the user has some default + windows specified - -- Dustin Kirkland Mon, 08 Jun 2009 17:56:10 -0500 + -- Dustin Kirkland Wed, 10 Jun 2009 14:18:23 -0500 byobu (2.9-0ubuntu1) karmic; urgency=low