From 996a790915b6a2738bf43a7302d6134c1a2f8b3c Mon Sep 17 00:00:00 2001 From: Dustin Kirkland Date: Wed, 22 Jul 2009 21:32:30 -0500 Subject: [PATCH] * byobu, byobu-launcher: - set the window title to "$USER@HOST - byobu" - do this in byobu, rather than byobu-launcher so that all byobu sessions, and not just auto-launched sessions get this - note that we're dropping $PWD since this does not actually work and replacing this with " - byobu" - for $PWD to work, we'd need screen to support two separate hardstatus lines, as we can either put it at the bottom of byobu, or in the window title, and hardstatus is the only tool available to us for tracking $PWD - drop the bash -i hack in byobu-launcher; this speeds up logins [ Kees Cook ] Signed-off-by: Dustin Kirkland --- byobu | 3 +++ byobu-launcher | 6 ------ debian/changelog | 15 +++++++++++++-- 3 files changed, 16 insertions(+), 8 deletions(-) diff --git a/byobu b/byobu index 9bcddc5d..4a8415bc 100755 --- a/byobu +++ b/byobu @@ -36,6 +36,9 @@ fi # Sanitize the environment byobu-janitor --force +# Set window title until https://bugs.launchpad.net/bugs/338722 is fixed in screen +echo -ne "\033]0;${USER}@$(hostname) - byobu\007" + # Launch motd+shell, unless the user has default windows set to launch [ -n "$SHELL" ] || SHELL="/bin/sh" [ -x "$SHELL" ] || SHELL="/bin/sh" diff --git a/byobu-launcher b/byobu-launcher index c2dc1728..a05bdb05 100755 --- a/byobu-launcher +++ b/byobu-launcher @@ -18,14 +18,8 @@ # You should have received a copy of the GNU General Public License # along with this program. If not, see . - [ "$TERM" = "screen" ] && exit 0 -# Ensure that the PROMPT_COMMAND gets printed, such that gnome-terminal -# and friends can pick it up before going into screen -export PROMPT_COMMAND='echo -ne "\033]0;${USER}@${HOSTNAME}: ${PWD/$HOME/~}\007"' -[ -x /bin/bash ] && echo | /bin/bash -i -s 2>/dev/null - out=`screen -ls 2>/dev/null` || true if echo "$out" | grep -qsi "^No Sockets found in "; then # Start new byobu session diff --git a/debian/changelog b/debian/changelog index 0aab6154..05195468 100644 --- a/debian/changelog +++ b/debian/changelog @@ -1,8 +1,19 @@ byobu (2.23) unreleased; urgency=low - * UNRELEASED + [ Kees Cook ] + * byobu, byobu-launcher: + - set the window title to "$USER@HOST - byobu" + - do this in byobu, rather than byobu-launcher so that all byobu + sessions, and not just auto-launched sessions get this + - note that we're dropping $PWD since this does not actually work + and replacing this with " - byobu" + - for $PWD to work, we'd need screen to support two separate + hardstatus lines, as we can either put it at the bottom of byobu, + or in the window title, and hardstatus is the only tool available + to us for tracking $PWD + - drop the bash -i hack in byobu-launcher; this speeds up logins - -- Dustin Kirkland Wed, 22 Jul 2009 19:41:42 -0500 + -- Dustin Kirkland Wed, 22 Jul 2009 21:26:42 -0500 byobu (2.22-0ubuntu1) karmic; urgency=low