How should I set GPG to use with KMail or even rather Thunderbird?

10-11  Source: Network gathering  Views:0 

In the last 3 hours I tried to set Thunderbird (Enigmail) and KMail to use my GPG key. I failed.
I made the keypairs with Kgpg, installed enigmail, restarted the Thunderbird, set everything, but TB didn't asked for password, only gave an error message that it can't use gpg in batch mode and the password is wrong:
gpg parancssor és kimenet:
gpg: Probléma van az ügynökkel. Letiltom a használatát.
gpg: can't query passphrase in batch mode
gpg: Érvénytelen jelszó. Próbálja újra...
gpg: can't query passphrase in batch mode
gpg: Érvénytelen jelszó. Próbálja újra...
gpg: can't query passphrase in batch mode
gpg: skipped "<my e-mail>": rossz jelszó
gpg: [stdin]: sign+encrypt failed: rossz jelszó - its in Hungarian, it says: Problem with the agent. Disabling use. Wrong password. Try again.
I read a lot and all I found is that I have to disable the use of gpg-agent in Enigmail's settings, but it was alredy disabled, despite I got this message:
"Your system uses gpg-agent or a similar tool for passphrase handling (gpg-agent is mandatory if GnuPG v2.0 or later is used). Since caching of passphrases is handled by gpg-agent, the respective timeout settings in OpenPGP are disregarded. In order to change passphrase caching options, please configure your gpg-agent tool."
After many pages I gave up, it seems it cannot be solved.
So I tried KMail. But KMail didn't ask password, too. Google, searching. I found that I should install pinentry-qt. Well, pinentry is already installed and I have pinentry, pinentry-qt and pinentry-qt4, too. So I searched for another solution. Then I found that I should use gpg-agent (I used it already according to Thunderbird) and I have to write use-agent to .gnupg/gpg.conf. It was already there. Then I found that I have to make a file, .gnupg/gpg-agent.conf whit this content:
pinentry-program /usr/bin/pinentry-qt4
default-cache-ttl 1800
So I made it. After this I add the eval "$(gpg-agent --daemon)" to my .xinitrc, as it was written in many posts. I logged out and in. Still no luck.
The gpg-agent in terminal says:
gpg-agent: gpg-agent running and available
I tried a test I found on forums: echo "test" | gpg -ase -r 0xDEADBEEF | gpg. It says:
1024-bit RSA key, ID CFF2728D, created 2011-05-17 (main key ID CD35B00C)
gpg: problem with the agent -disabling agent use.
Then it asks the passphrase. I type it in, but then a message appears that I didn't have any public key.
I tried to disable gpg-agent, but didn't helped. Thunderbird said:
"can't connect to `/tmp/gpg-y2XPqU/S.gpg-agent': Kapcsolat elutasítva
gpg: Nem tudok kapcsolódni "/tmp/gpg-y2XPqU/S.gpg-agent" objektumhoz: connect failed" - connection refused. Can't connect to /tmp... object.
KMail simply says bad passphrase.
So. How can I use GPG? What should I do, how should I start? Is it possible at all? I just wanted to sign and encrypt e-mails. It seemed very easy.
ps.: all the installed softwares are up to dated. And sorry about the mistakes in my English, if any!
Hi Melfour-
Here is a Support article detailing how to work with your Firefox PDF preferences:
[[Opening PDF files within Firefox]]
Hope that helps.
Related articles