From 13fc71a055bfac3f1a72761ff27834ffee0a66a0 Mon Sep 17 00:00:00 2001 From: Dustin Kirkland Date: Tue, 8 Nov 2011 17:21:22 -0600 Subject: [PATCH] * usr/bin/byobu, usr/bin/byobu-reconnect-sockets, usr/share/byobu/profiles/tmux: LP: #883637 - fix reconnection to SESSION_MANAGER and DBUS_SESSION_BUS_ADDRESS - add C-F5 key to tmux profile --- debian/changelog | 4 ++++ usr/bin/byobu | 4 ++++ usr/bin/byobu-reconnect-sockets | 6 +++++- usr/share/byobu/profiles/tmux | 1 + 4 files changed, 14 insertions(+), 1 deletion(-) diff --git a/debian/changelog b/debian/changelog index a81f3461..1f130fd1 100644 --- a/debian/changelog +++ b/debian/changelog @@ -11,6 +11,10 @@ byobu (4.46) unreleased; urgency=low * configure.ac, debian/install, etc/byobu/Makefile.am, etc/profile.d/Makefile.am: - fix installations to /etc + * usr/bin/byobu, usr/bin/byobu-reconnect-sockets, + usr/share/byobu/profiles/tmux: LP: #883637 + - fix reconnection to SESSION_MANAGER and DBUS_SESSION_BUS_ADDRESS + - add C-F5 key to tmux profile -- Dustin Kirkland Mon, 31 Oct 2011 09:46:46 -0400 diff --git a/usr/bin/byobu b/usr/bin/byobu index 158e93d9..3b8c4a33 100755 --- a/usr/bin/byobu +++ b/usr/bin/byobu @@ -117,6 +117,10 @@ case $BYOBU_BACKEND in ;; esac +# Save session info +[ -n "$DBUS_SESSION_BUS_ADDRESS" ] && printf "DBUS_SESSION_BUS_ADDRESS=$DBUS_SESSION_BUS_ADDRESS\n" > "$BYOBU_RUN_DIR/sockets" +[ -n "$SESSION_MANAGER" ] && printf "SESSION_MANAGER=$SESSION_MANAGER\n" >> "$BYOBU_RUN_DIR/sockets" + # Now let's execute the backend! if [ "$#" = "0" ]; then if [ "$CUSTOM_WINDOW_SET" = "1" ]; then diff --git a/usr/bin/byobu-reconnect-sockets b/usr/bin/byobu-reconnect-sockets index 2775e10d..d74986b4 100755 --- a/usr/bin/byobu-reconnect-sockets +++ b/usr/bin/byobu-reconnect-sockets @@ -43,6 +43,10 @@ newest "$HOME/.gnupg/"gpg-agent-info-* && . "$_RET" && export GPG_AGENT_INFO # Reconnect dbus, source the most recently touched session-bus # Sorry, ls -t is needed here, to sort by time -newest "$HOME/.dbus/session-bus/*" && . "$_RET" && export DBUS_SESSION_DBUS_ADDRESS +newest "$HOME/.dbus/session-bus/*" && . "$_RET" + +[ -r "$BYOBU_RUN_DIR/sockets" ] && . "$BYOBU_RUN_DIR/sockets" +export DBUS_SESSION_DBUS_ADDRESS +export SESSION_MANAGER # vi: syntax=sh ts=4 noexpandtab diff --git a/usr/share/byobu/profiles/tmux b/usr/share/byobu/profiles/tmux index f95508d4..a4259041 100644 --- a/usr/share/byobu/profiles/tmux +++ b/usr/share/byobu/profiles/tmux @@ -64,6 +64,7 @@ bind-key -n M-right next-window bind-key -n M-Up choose-session \; send-keys Up \; send-keys Enter bind-key -n M-Down choose-session \; send-keys Down \; send-keys Enter bind-key -n S-F11 break-pane +bind-key -n C-F5 send-keys ". $BYOBU_PREFIX/bin/byobu-reconnect-sockets" \; send-keys Enter set-option -g set-titles on set-option -g set-titles-string '#(whoami)@#H - byobu (#S)'