mirror of
https://github.com/dustinkirkland/byobu
synced 2025-08-22 22:34:23 -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-status-detail
|
||||||
- usr/bin/byobu-reconnect-sockets
|
- usr/bin/byobu-reconnect-sockets
|
||||||
- usr/bin/byobu-launch, usr/bin/byobu-launcher-install,
|
- 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
|
* usr/bin/byobu-config, usr/share/doc/byobu/help.txt: improve help
|
||||||
text, per feedback from Turnkey Linux users
|
text, per feedback from Turnkey Linux users
|
||||||
|
|
|
@ -17,37 +17,45 @@
|
||||||
# You should have received a copy of the GNU General Public License
|
# You should have received a copy of the GNU General Public License
|
||||||
# along with this program. If not, see <http://www.gnu.org/licenses/>.
|
# along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||||
|
|
||||||
if [ ! -r "$HOME/.byobu/disable-autolaunch" ]; then
|
if [ ! -e "$HOME/.byobu/disable-autolaunch" ]; then
|
||||||
if printf "$TERM" | grep -qs "screen"; then
|
case "$TERM" in
|
||||||
# Handle nesting
|
*screen*)
|
||||||
printf "$(gettext 'Do you want to launch byobu in a nested session?') [y/N]: "
|
# Handle nesting
|
||||||
answer=$(head -n1)
|
printf "$(gettext 'Do you want to launch byobu in a nested session?') [y/N]: "
|
||||||
if [ "$answer" = "y" ] || [ "$answer" = "Y" ]; then
|
answer=$(head -n1)
|
||||||
# Prevent nasty launch recursion, if ssh'ing to localhost
|
case "$answer" in
|
||||||
if [ -n "$SSH_CONNECTION" ]; then
|
y|Y)
|
||||||
# This is an SSH session
|
# Prevent nasty launch recursion, if ssh'ing to localhost
|
||||||
from=$(echo "$SSH_CONNECTION" | awk '{print $1}')
|
if [ -n "$SSH_CONNECTION" ]; then
|
||||||
to=$(echo "$SSH_CONNECTION" | awk '{print $3}')
|
# This is an SSH session
|
||||||
if [ "$from" = "$to" ]; then
|
from=$(echo "$SSH_CONNECTION" | awk '{print $1}')
|
||||||
# We have ssh'd from this machine, to this machine
|
to=$(echo "$SSH_CONNECTION" | awk '{print $3}')
|
||||||
if screen -ls | grep -qs '(Attached)$'; then
|
if [ "$from" = "$to" ]; then
|
||||||
# And there is already an attached screen session
|
# We have ssh'd from this machine, to this machine
|
||||||
# Exit to prevent recursion
|
case "$(screen -ls)" in
|
||||||
false
|
*\(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
|
else
|
||||||
exec /usr/bin/byobu "$@"
|
exec /usr/bin/byobu "$@"
|
||||||
fi
|
fi
|
||||||
else
|
;;
|
||||||
exec /usr/bin/byobu "$@"
|
*)
|
||||||
fi
|
false
|
||||||
else
|
;;
|
||||||
exec /usr/bin/byobu "$@"
|
esac
|
||||||
fi
|
;;
|
||||||
else
|
*)
|
||||||
false
|
exec /usr/bin/byobu "$@"
|
||||||
fi
|
;;
|
||||||
else
|
esac
|
||||||
exec /usr/bin/byobu "$@"
|
|
||||||
fi
|
|
||||||
fi
|
fi
|
||||||
false
|
false
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue