diff options
author | Adrian C. (anrxc) <anrxc@sysphere.org> | 2010-02-15 03:43:45 +0100 |
---|---|---|
committer | Adrian C. (anrxc) <anrxc@sysphere.org> | 2010-02-15 03:44:48 +0100 |
commit | 261c0ba1097f17635a9ceeea371f960ce7c98062 (patch) | |
tree | 33ebcb88f9733f2a7cdc4ac06c1ef6096232b27c /xinitrc | |
parent | fbd0bff3e8e7e3ec28a01773a6172973b3720386 (diff) | |
download | dotfiles-261c0ba1097f17635a9ceeea371f960ce7c98062.tar.xz |
gnupg: reuse the running agent on X11 startup
Diffstat (limited to 'xinitrc')
-rwxr-xr-x | xinitrc | 7 |
1 files changed, 6 insertions, 1 deletions
@@ -100,7 +100,12 @@ fi # {{{ Autostart settings # # Start the GnuPG agent and enable the OpenSSH agent emulation -eval "$(/usr/bin/killall gpg-agent; /usr/bin/gpg-agent --enable-ssh-support --daemon)" +if ( /bin/pidof gpg-agent >/dev/null ); then + eval "$(cat $HOME/.gnupg/gpg-agent-info)" + eval "$(cut -d= -f 1 < $HOME/.gnupg/gpg-agent-info | xargs echo export)" +else + eval "$(gpg-agent --enable-ssh-support --daemon)" +fi # Play a startup sound #/usr/bin/ogg123 -q $HOME/.fvwm/sounds/Startup.ogg & |