byobu-janitor, byobu-launcher, profiles/common: establish and update an

SSH_AUTH_SOCK link, on screen launch and reconnect, LP: #424522
This commit is contained in:
Dustin Kirkland 2009-09-17 11:08:43 -05:00
commit 32a17109dd
4 changed files with 15 additions and 3 deletions

View file

@ -20,7 +20,8 @@
# along with this program. If not, see <http://www.gnu.org/licenses/>.
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

View file

@ -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

4
debian/changelog vendored
View file

@ -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 <kirkland@ubuntu.com> Thu, 17 Sep 2009 09:05:57 -0500
-- Dustin Kirkland <kirkland@ubuntu.com> Thu, 17 Sep 2009 11:07:03 -0500
byobu (2.32-0ubuntu1) karmic; urgency=low

View file

@ -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