diff --git a/byobu-janitor b/byobu-janitor
index 4642232f..781a6471 100755
--- a/byobu-janitor
+++ b/byobu-janitor
@@ -20,7 +20,8 @@
# along with this program. If not, see .
PKG="byobu"
-FLAG="/var/run/screen/S-$USER/$PKG.reload-required"
+RUN="/var/run/screen/S-$USER"
+FLAG="$RUN/$PKG.reload-required"
# Exit immediately, if we're not forced, and there is no reload flag
if [ "$1" != "--force" ] && [ ! -e "$FLAG" ]; then
@@ -32,6 +33,9 @@ OLDPKG="screen-profiles"
DEFAULT_PROFILE="light"
PROFILE="$HOME/.$PKG/profile"
+# Establish ssh-agent socket, helps when reconnecting to a detached session
+[ -r "$SSH_AUTH_SOCK" ] && [ -w "$RUN" ] && ln -sf "$SSH_AUTH_SOCK" "$RUN/$PKG.ssh-agent"
+
# Affects: users who launched using sudo, such that their config dir
# is not writable by them
if [ -d "$HOME/.$PKG" ] && [ ! -w "$HOME/.$PKG" ]; then
diff --git a/byobu-launcher b/byobu-launcher
index b29a4970..4879cc16 100755
--- a/byobu-launcher
+++ b/byobu-launcher
@@ -29,7 +29,10 @@ if echo "$out" | grep -qsi "^No Sockets found in "; then
# Start new session
exec $PKG
else
- # Set window title and re-attach to an existing session
+ # Set window title
printf "\033]0;${USER}@$(hostname) - ${PKG}\007"
+ # Update ssh-agent socket
+ [ -r "$SSH_AUTH_SOCK" ] && [ -w "$RUN" ] && ln -sf "$SSH_AUTH_SOCK" "$RUN/$PKG.ssh-agent"
+ # Re-attach to existing session
exec screen -xRR
fi
diff --git a/debian/changelog b/debian/changelog
index b0892bc9..ada568ee 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -8,8 +8,10 @@ byobu (2.33) unreleased; urgency=low
* po/byoub-*.po: rename to just *.po, fix translations location, LP: #430095
* debian/postinst, debian/preinst: move symlink of screen-profiles-status ->
byobu-status from the postinst to the preinst
+ * byobu-janitor, byobu-launcher, profiles/common: establish and update an
+ SSH_AUTH_SOCK link, on screen launch and reconnect, LP: #424522
- -- Dustin Kirkland Thu, 17 Sep 2009 09:05:57 -0500
+ -- Dustin Kirkland Thu, 17 Sep 2009 11:07:03 -0500
byobu (2.32-0ubuntu1) karmic; urgency=low
diff --git a/profiles/common b/profiles/common
index 935ec231..f799b6f9 100644
--- a/profiles/common
+++ b/profiles/common
@@ -81,4 +81,7 @@ defbce "on"
# Log 10000 lines
defscrollback 10000
+# Maintain SSH_AUTH_SOCK link
+setenv SSH_AUTH_SOCK /var/run/screen/S-$USER/byobu.ssh-agent
+
source $HOME/.byobu/keybindings