aboutsummaryrefslogtreecommitdiffstats
path: root/.profile
diff options
context:
space:
mode:
authorWeitian LI <liweitianux@gmail.com>2015-01-21 09:37:57 +0800
committerWeitian LI <liweitianux@gmail.com>2015-01-21 09:38:54 +0800
commite4fb853b5e8c745bf610e3d478c905a1f5c1c30d (patch)
tree4651f09bc4609220c3158a87c6638baea5c4a58a /.profile
parent0b08340aecac94e17356431894c9635d9bc958d2 (diff)
downloaddotfiles-e4fb853b5e8c745bf610e3d478c905a1f5c1c30d.tar.bz2
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.
Diffstat (limited to '.profile')
-rw-r--r--.profile10
1 files changed, 9 insertions, 1 deletions
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.