3
# byobu-reconnect-sockets - source this file to re-establish
4
# GPG_AGENT_INFO and DBUS_SESSION_BUS_ADDRESS,
5
# useful when reconnecting to an existing
8
# Copyright (C) 2009 Canonical Ltd.
10
# Authors: Dustin Kirkland <kirkland@ubuntu.com>
12
# This program is free software: you can redistribute it and/or modify
13
# it under the terms of the GNU General Public License as published by
14
# the Free Software Foundation, version 3 of the License.
16
# This program is distributed in the hope that it will be useful,
17
# but WITHOUT ANY WARRANTY; without even the implied warranty of
18
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
19
# GNU General Public License for more details.
21
# You should have received a copy of the GNU General Public License
22
# along with this program. If not, see <http://www.gnu.org/licenses/>.
25
[ -r "$HOME/.byoburc" ] && . "$HOME/.byoburc"
26
[ -z "${BYOBU_PREFIX}" ] && export BYOBU_PREFIX="/usr" || export BYOBU_PREFIX
27
. "${BYOBU_PREFIX}/lib/${PKG}/include/common"
35
echo "ERROR: You must source this file, rather than execute it." 2>&1
42
# Establish gpg-agent socket, helps when reconnecting to a detached session
43
newest "$HOME/.gnupg/"gpg-agent-info-* && . "$_RET" && export GPG_AGENT_INFO
45
# Reconnect dbus, source the most recently touched session-bus
46
# Sorry, ls -t is needed here, to sort by time
47
newest "$HOME/.dbus/session-bus/*" && . "$_RET"
49
[ -r "$BYOBU_RUN_DIR/sockets" ] && . "$BYOBU_RUN_DIR/sockets"
50
export DBUS_SESSION_DBUS_ADDRESS
51
export SESSION_MANAGER
53
# vi: syntax=sh ts=4 noexpandtab