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)
This commit is contained in:
Dustin Kirkland 2010-02-09 13:28:08 -06:00
commit 96a0503395
5 changed files with 26 additions and 9 deletions

3
debian/changelog vendored
View file

@ -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 <kirkland@ubuntu.com> Tue, 09 Feb 2010 00:07:27 -0600

2
debian/postinst vendored
View file

@ -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

20
usr/bin/byobu-launch Executable file
View file

@ -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 <kirkland@canonical.com>
#
# 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 <http://www.gnu.org/licenses/>.
`echo \$- | grep -qs i` && byobu-launcher

View file

@ -17,10 +17,4 @@
# You should have received a copy of the GNU General Public License
# along with this program. If not, see <http://www.gnu.org/licenses/>.
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

View file

@ -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