byobu-reconnect-sockets, byobu-reconnect-sockets.1, debian/install,

debian/rules: create a sourcable shell script that updates the gpg-agent
and dbus socket environment variables, LP: #486511
This commit is contained in:
Dustin Kirkland 2009-12-09 17:53:21 -08:00
commit 03f4b0dba9
5 changed files with 65 additions and 1 deletions

43
byobu-reconnect-sockets Executable file
View file

@ -0,0 +1,43 @@
#!/bin/sh
#
# byobu-reconnect-sockets - source this file to re-establish
# GPG_AGENT_INFO and DBUS_SESSION_BUS_ADDRESS,
# useful when reconnecting to an existing
# byobu session.
#
# Copyright (C) 2009 Canonical Ltd.
#
# Authors: Dustin Kirkland <kirkland@canonical.com>
#
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation, version 3 of the License.
#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for more details.
#
# You should have received a copy of the GNU General Public License
# along with this program. If not, see <http://www.gnu.org/licenses/>.
if ! echo $- | grep -qs i; then
echo
echo "ERROR: You must source this file, rather than execute it."
echo " . $0"
echo
#exit 1
fi
# Establish gpg-agent socket, helps when reconnecting to a detached session
for i in $(ls "$HOME/.gnupg/"gpg-agent-info-*); do
. "$i" || continue
export GPG_AGENT_INFO && break
done
# Reconnect dbus, source the most recently touched session-bus
for i in $(ls -t "$HOME/.dbus/session-bus/" 2>/dev/null); do
. "$HOME/.dbus/session-bus/$i" || continue
export DBUS_SESSION_BUS_ADDRESS && break
done

17
byobu-reconnect-sockets.1 Normal file
View file

@ -0,0 +1,17 @@
.TH byobu-reconnect-sockets 1 "7 Dec 2009" byobu "byobu"
.SH NAME
byobu\-reconnect\-sockets \- Sourcable script that updates GPG_AGENT_INFO and DBUS_SESSION_BUS_ADDRESS in the environment
.SH DESCRIPTION
\fBbyobu\-reconnect\-sockets\fP is a sourcable bit of shell code that will update the GPG_AGENT_INFO and DBUS_SESSION_BUS_ADDRESS environment variables in the current shell, such that you may restablish connection to \fBgpg\-agent\fP(1) and \fBdbus\-daemon(1)\fP.
This is often useful when reattaching to a detached Byobu session.
.TP
\fIhttp://launchpad.net/byobu\fP
.PD
.SH AUTHOR
This manpage and the utility were written by Dustin Kirkland <kirkland@canonical.com> for Ubuntu systems (but may be used by others). Permission is granted to copy, distribute and/or modify this document under the terms of the GNU General Public License, Version 3 published by the Free Software Foundation.
On Debian systems, the complete text of the GNU General Public License can be found in /usr/share/common-licenses/GPL.

3
debian/changelog vendored
View file

@ -52,6 +52,9 @@ byobu (2.40) unreleased; urgency=low
* bin/custom, byobu-status: support --detail in custom scripts * bin/custom, byobu-status: support --detail in custom scripts
* bin/byobu-export: * bin/byobu-export:
- drop the color selection, no longer necessary - drop the color selection, no longer necessary
* byobu-reconnect-sockets, byobu-reconnect-sockets.1, debian/install,
debian/rules: create a sourcable shell script that updates the gpg-agent
and dbus socket environment variables, LP: #486511
-- Dustin Kirkland <kirkland@ubuntu.com> Tue, 10 Nov 2009 10:18:20 -0600 -- Dustin Kirkland <kirkland@ubuntu.com> Tue, 10 Nov 2009 10:18:20 -0600

1
debian/install vendored
View file

@ -10,6 +10,7 @@ windows/common usr/share/byobu/windows
byobu-select-profile usr/bin byobu-select-profile usr/bin
byobu usr/bin byobu usr/bin
byobu-config usr/bin byobu-config usr/bin
byobu-reconnect-sockets usr/bin
byobu-status usr/bin byobu-status usr/bin
byobu-status-detail usr/bin byobu-status-detail usr/bin
byobu-janitor usr/bin byobu-janitor usr/bin

2
debian/rules vendored
View file

@ -56,7 +56,7 @@ binary-indep: build install
dh_testdir -i dh_testdir -i
dh_testroot -i dh_testroot -i
dh_installdocs -X.bzr -i dh_installdocs -X.bzr -i
dh_installman -i byobu-launcher.1 byobu.1 byobu-config.1 byobu-select-profile.1 motd+shell.1 byobu-export.1 byobu-status.1 byobu-status-detail.1 dh_installman -i byobu-launcher.1 byobu.1 byobu-config.1 byobu-select-profile.1 motd+shell.1 byobu-export.1 byobu-status.1 byobu-status-detail.1 byobu-reconnect-sockets.1
dh_installchangelogs -i dh_installchangelogs -i
dh_installdebconf -i dh_installdebconf -i
dh_compress -i dh_compress -i