If, like me, you run KMail trunk (what will be 4.2), sign your emails and don’t use gpg-agent, you may have found that signing emails suddenly stopped working a while back. I finally traced the problem: a change in the way signing is done with the gpgme backend means that kleo, the magic behind all things cryptographic in kdepim, no longer provides a password entry dialog. The reason is that the signing is done in a side thread, and GUI stuff can only be done in the main thread.
The solution? Use gpg-agent, of course. You need to install gpg-agent and the pinentry package, and then put a script (call it gpg-agent.sh – the .sh is important) in $KDEHOME/env that starts gpg-agent. The contents of my ~/.kde/env/gpg-agent.sh file are simply:
eval $(gpg-agent --daemon --pinentry-program /usr/bin/pinentry-qt)
You should also stop it again at logout. To do this put the following script in the $KDEHOME/shutdown folder and make it executable:
!/bin/sh
# the second field of the GPG_AGENT_INFO variable is the
# process ID of the gpg-agent active in the current session
# so we'll just kill that, rather than all of them
[ -n "${GPG_AGENT_INFO}" ] &&
kill $(echo "${GPG_AGENT_INFO}" | cut -d ':' -f 2)
All this stolen from a Gentoo HOWTO.
26th July 2008 at 12:38 am |
Thank you very much! This just made my day! I have been at a loss trying to figure out how to get my e-mails signed using KMail (in 4.1). Thank you again!
8th October 2008 at 7:29 am |
but it don’t working for me!
i’m using kmail 1.10.1 on KDE 4.1.2 on Kubuntu
12th October 2008 at 4:57 am |
12th October 2008 at 5:09 am |
[...] مطلب از اینجا دزدیده [...]
17th February 2009 at 1:14 pm |
Thanks, it works!
You just forgot to mention that gpg-agent.sh should also be made executable.