Thursday, June 12, 2014

Enigmail doesn't remember key password

I've been using enigmail for some time and it had one annoying bug, or perhaps this was caused by some misconfiguration in my system, each time I've tried to open an encrypted email a password prompt appeared.

After some googling I've found gpg-agent, which is supposed to store this password. It has to be started before thunderbird and a variable $GPG_AGENT_INFO need to be exported. To achieve this, add to your .bashrc file:
# export gpg-agent info
[ $(pgrep gpg-agent &>/dev/null; echo $?) -eq 1 ] && gpg-agent --daemon 1>~/.gpg-agent
[ -z $GPG_AGENT_INFO ] && source ~/.gpg-agent

NOTE: if you are using program/daemon to start thunderbird (e.g. xbindkeys) you have to export GPG_AGENT_INFO prior to starting this daemon.

No comments:

Post a Comment