mirror of
https://github.com/dustinkirkland/byobu
synced 2025-08-22 14:24:39 -07:00
usr/bin/byobu-launcher-uninstall
- usr/bin/byobu-launcher
This commit is contained in:
parent
dc523ce104
commit
325c5a51f8
2 changed files with 39 additions and 30 deletions
3
debian/changelog
vendored
3
debian/changelog
vendored
|
@ -8,7 +8,8 @@ byobu (2.81-0ubuntu1) maverick; urgency=low
|
|||
- usr/bin/byobu-status-detail
|
||||
- usr/bin/byobu-reconnect-sockets
|
||||
- usr/bin/byobu-launch, usr/bin/byobu-launcher-install,
|
||||
usr/bin/byobu-launcher-uninstall:
|
||||
usr/bin/byobu-launcher-uninstall
|
||||
- usr/bin/byobu-launcher
|
||||
|
||||
* usr/bin/byobu-config, usr/share/doc/byobu/help.txt: improve help
|
||||
text, per feedback from Turnkey Linux users
|
||||
|
|
|
@ -17,37 +17,45 @@
|
|||
# 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 printf "$TERM" | grep -qs "screen"; then
|
||||
# Handle nesting
|
||||
printf "$(gettext 'Do you want to launch byobu in a nested session?') [y/N]: "
|
||||
answer=$(head -n1)
|
||||
if [ "$answer" = "y" ] || [ "$answer" = "Y" ]; then
|
||||
# Prevent nasty launch recursion, if ssh'ing to localhost
|
||||
if [ -n "$SSH_CONNECTION" ]; then
|
||||
# This is an SSH session
|
||||
from=$(echo "$SSH_CONNECTION" | awk '{print $1}')
|
||||
to=$(echo "$SSH_CONNECTION" | awk '{print $3}')
|
||||
if [ "$from" = "$to" ]; then
|
||||
# We have ssh'd from this machine, to this machine
|
||||
if screen -ls | grep -qs '(Attached)$'; then
|
||||
# And there is already an attached screen session
|
||||
# Exit to prevent recursion
|
||||
false
|
||||
if [ ! -e "$HOME/.byobu/disable-autolaunch" ]; then
|
||||
case "$TERM" in
|
||||
*screen*)
|
||||
# Handle nesting
|
||||
printf "$(gettext 'Do you want to launch byobu in a nested session?') [y/N]: "
|
||||
answer=$(head -n1)
|
||||
case "$answer" in
|
||||
y|Y)
|
||||
# Prevent nasty launch recursion, if ssh'ing to localhost
|
||||
if [ -n "$SSH_CONNECTION" ]; then
|
||||
# This is an SSH session
|
||||
from=$(echo "$SSH_CONNECTION" | awk '{print $1}')
|
||||
to=$(echo "$SSH_CONNECTION" | awk '{print $3}')
|
||||
if [ "$from" = "$to" ]; then
|
||||
# We have ssh'd from this machine, to this machine
|
||||
case "$(screen -ls)" in
|
||||
*\(Attached\)*)
|
||||
# And there is already an attached screen session, exit to prevent recursion
|
||||
false
|
||||
;;
|
||||
*)
|
||||
exec /usr/bin/byobu "$@"
|
||||
;;
|
||||
esac
|
||||
else
|
||||
exec /usr/bin/byobu "$@"
|
||||
fi
|
||||
else
|
||||
exec /usr/bin/byobu "$@"
|
||||
fi
|
||||
else
|
||||
exec /usr/bin/byobu "$@"
|
||||
fi
|
||||
else
|
||||
exec /usr/bin/byobu "$@"
|
||||
fi
|
||||
else
|
||||
false
|
||||
fi
|
||||
else
|
||||
exec /usr/bin/byobu "$@"
|
||||
fi
|
||||
;;
|
||||
*)
|
||||
false
|
||||
;;
|
||||
esac
|
||||
;;
|
||||
*)
|
||||
exec /usr/bin/byobu "$@"
|
||||
;;
|
||||
esac
|
||||
fi
|
||||
false
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue