diff --git a/debian/changelog b/debian/changelog index 7351366f..6971ee57 100644 --- a/debian/changelog +++ b/debian/changelog @@ -7,6 +7,9 @@ byobu (2.57) unreleased; urgency=low in the launcher * byobu-config: correct logic in determining if byobu is set to auto launch + * debian/postinst, usr/bin/byobu-launch, usr/bin/byobu-launcher, + usr/bin/byobu-launcher-install: ensure that all login methods work + (tty, ssh, gdm), and that each detach behaves properly (c-a-d, c-a-DD) -- Dustin Kirkland Tue, 09 Feb 2010 00:07:27 -0600 diff --git a/debian/postinst b/debian/postinst index b7eebb39..ac20d1dd 100644 --- a/debian/postinst +++ b/debian/postinst @@ -7,7 +7,7 @@ PKG="byobu" db_get byobu/launch-by-default if [ "$RET" = true ]; then - ln -sf /usr/bin/$PKG-launcher /etc/profile.d/Z98-$PKG.sh + ln -sf /usr/bin/$PKG-launch /etc/profile.d/Z98-$PKG.sh else rm -f /etc/profile.d/Z98-$PKG.sh fi diff --git a/usr/bin/byobu-launch b/usr/bin/byobu-launch new file mode 100755 index 00000000..8a22ad53 --- /dev/null +++ b/usr/bin/byobu-launch @@ -0,0 +1,20 @@ +#!/bin/sh -e +# +# byobu-launch - call the launcher if we're in an interactive shell +# Copyright (C) 2010 Canonical Ltd. +# +# Authors: Dustin Kirkland +# +# This program is free software: you can redistribute it and/or modify +# it under the terms of the GNU General Public License as published by +# the Free Software Foundation, version 3 of the License. +# +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU General Public License for more details. +# +# You should have received a copy of the GNU General Public License +# along with this program. If not, see . + +`echo \$- | grep -qs i` && byobu-launcher diff --git a/usr/bin/byobu-launcher b/usr/bin/byobu-launcher index 3120baf9..a665f288 100755 --- a/usr/bin/byobu-launcher +++ b/usr/bin/byobu-launcher @@ -17,10 +17,4 @@ # You should have received a copy of the GNU General Public License # along with this program. If not, see . -if [ ! -r "$HOME/.byobu/disable-autolaunch" ]; then - if echo $- | grep -qs i; then - /usr/bin/byobu - else - exec /usr/bin/byobu - fi -fi +[ ! -r "$HOME/.byobu/disable-autolaunch" ] && exec /usr/bin/byobu diff --git a/usr/bin/byobu-launcher-install b/usr/bin/byobu-launcher-install index 5dc932ab..49e4755e 100755 --- a/usr/bin/byobu-launcher-install +++ b/usr/bin/byobu-launcher-install @@ -23,7 +23,7 @@ PKG="byobu" install_launcher() { dest=$1 launcher="byobu-launcher" - launcher_line="\`echo \$- | grep -qs i\` && which $launcher > /dev/null && $launcher" + launcher_line="\`echo \$- | grep -qs i\` && $launcher" # Add it at the end echo "$launcher_line" >> "$dest" # Hush login, since byobu will handle motd printing