bapoumba's blog

Sign and encrypt mail with Thunderbird (enigmail)

Well, I had decided to give Thunderbird a go after I installed gutsy. I had never tried it actually, only to get my univ mails on a Windows box at work. This entry is to document an error I had, with the fix.

When restarting Tb, a wizard will run, it’s all pretty straightforward. But I could not get to sign an email. Encryption would run fine, but then a similar error would come up, all related to the passphrase for my gpg key:

gpg can't connect to ~/.gnome2/seahorse-Mq1hUm/S.gpg-agent

Hmm… I did read tons of emails provided by a google search, forums posts and such. Then, I had a look at my ~/.gnupg/gpg.conf. Sure enough, commenting the lines:

Yes, and this is the part that I really did not understand and that took me a long time to find a workaround… I’ll have to check Tb on my feisty box (where I use Evolution and had no problem with). It may be a gusty problem, but I had no time to investigate further. Thanks HTL :)

That’s because, if the two lines you mentioned were uncommented, the second one forces Enigmail to use the path ~/.gnome2/seahorse-Mq1hUm/S.gpg-agent to connect to the gpg-agent, which is often not correct. If you comment out that line only, the path to the GPG agent socket will be autodetected using the GPG_AGENT_INFO environment variable, like this :

firas@Ana ~ $ echo $GPG_AGENT_INFO
/tmp/gpg-FbBmHU/S.gpg-agent:6450:1

as you can see, not at all like the path it tried to connect to before ^^

You also need to install a pinentry package so it will display a dialog window where you can enter your passphrase. Since you’re usinK the evil Knome, I Kuess, pinentry-gtk2 will do the tricK for you ;)