mirror of
https://github.com/dustinkirkland/byobu
synced 2025-08-22 22:34:23 -07:00
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:
parent
38639eeb44
commit
32a17109dd
4 changed files with 15 additions and 3 deletions
|
@ -20,7 +20,8 @@
|
||||||
# along with this program. If not, see <http://www.gnu.org/licenses/>.
|
# along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||||
|
|
||||||
PKG="byobu"
|
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
|
# Exit immediately, if we're not forced, and there is no reload flag
|
||||||
if [ "$1" != "--force" ] && [ ! -e "$FLAG" ]; then
|
if [ "$1" != "--force" ] && [ ! -e "$FLAG" ]; then
|
||||||
|
@ -32,6 +33,9 @@ OLDPKG="screen-profiles"
|
||||||
DEFAULT_PROFILE="light"
|
DEFAULT_PROFILE="light"
|
||||||
PROFILE="$HOME/.$PKG/profile"
|
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
|
# Affects: users who launched using sudo, such that their config dir
|
||||||
# is not writable by them
|
# is not writable by them
|
||||||
if [ -d "$HOME/.$PKG" ] && [ ! -w "$HOME/.$PKG" ]; then
|
if [ -d "$HOME/.$PKG" ] && [ ! -w "$HOME/.$PKG" ]; then
|
||||||
|
|
|
@ -29,7 +29,10 @@ if echo "$out" | grep -qsi "^No Sockets found in "; then
|
||||||
# Start new session
|
# Start new session
|
||||||
exec $PKG
|
exec $PKG
|
||||||
else
|
else
|
||||||
# Set window title and re-attach to an existing session
|
# Set window title
|
||||||
printf "\033]0;${USER}@$(hostname) - ${PKG}\007"
|
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
|
exec screen -xRR
|
||||||
fi
|
fi
|
||||||
|
|
4
debian/changelog
vendored
4
debian/changelog
vendored
|
@ -8,8 +8,10 @@ byobu (2.33) unreleased; urgency=low
|
||||||
* po/byoub-*.po: rename to just *.po, fix translations location, LP: #430095
|
* po/byoub-*.po: rename to just *.po, fix translations location, LP: #430095
|
||||||
* debian/postinst, debian/preinst: move symlink of screen-profiles-status ->
|
* debian/postinst, debian/preinst: move symlink of screen-profiles-status ->
|
||||||
byobu-status from the postinst to the preinst
|
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
|
byobu (2.32-0ubuntu1) karmic; urgency=low
|
||||||
|
|
||||||
|
|
|
@ -81,4 +81,7 @@ defbce "on"
|
||||||
# Log 10000 lines
|
# Log 10000 lines
|
||||||
defscrollback 10000
|
defscrollback 10000
|
||||||
|
|
||||||
|
# Maintain SSH_AUTH_SOCK link
|
||||||
|
setenv SSH_AUTH_SOCK /var/run/screen/S-$USER/byobu.ssh-agent
|
||||||
|
|
||||||
source $HOME/.byobu/keybindings
|
source $HOME/.byobu/keybindings
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue