From e4fb853b5e8c745bf610e3d478c905a1f5c1c30d Mon Sep 17 00:00:00 2001 From: Weitian LI Date: Wed, 21 Jan 2015 09:37:57 +0800 Subject: Updated .profile for gpg-agent; Removed .config/fcitx. .gnupg/gpg-agent.conf: Changed to use pinentry-gtk-2. Because Evolution does *NOT* support pinentry-ncurses. --- .profile | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) (limited to '.profile') diff --git a/.profile b/.profile index 760945f..822f6b8 100644 --- a/.profile +++ b/.profile @@ -29,7 +29,15 @@ fi export PATH=$PATH:/usr/local/texlive/bin/x86_64-linux ###### gpg agent ###### -eval "$(gpg-agent --daemon)" +gpgenv="$HOME/.gnupg/gpg-agent.env" +if [ -e "${gpgenv}" ] && kill -0 $(grep GPG_AGENT_INFO "${gpgenv}" \ + | cut -d: -f 2) 2>/dev/null; then + eval "$(cat "${gpgenv}")" +else + eval "$(gpg-agent --daemon --enable-ssh-support --write-env-file "${gpgenv}")" +fi +export GPG_AGENT_INFO +export SSH_AUTH_SOCK # enable gpg-agent for ssh # This file is sourced by bash for login shells. The following line # runs your .bashrc and is recommended by the bash info pages. -- cgit v1.2.2