pinentry error with Thunderbird using External GnuPG

Hello there. Isaac here.

So I was trying to set up Thunderbird with external GnuPG on my Arch Linux machine, specifically with a keyring on the disk. The desktop environment is KDE Plasma.

The ArchWiki's Thunderbird page wasn't the most detailed on the setup and troubleshooting, though you shouldn't encounter the problems I have if you've properly set up some stuff according to the GnuPG page on the ArchWiki.

What I did up until the point of error is following the 4 steps in the wiki along with adding the public key to the OpenPGP Key Manager in Thunderbird (https://wiki.mozilla.org/Thunderbird:OpenPGP:Smartcards). After doing all this I tried to send a signed email but Thunderbird kept returning an error without specifying what the problem is. All it says was that it is unable to sign the message.

Using journalctl I was able to find out that the problem was with pinentry. Specifically:

"command 'PKSIGN' failed: Inappropriate ioctl for device <Pinentry>".

You'll probably get this error if you didn't follow the GnuPG page, specifically the pinentry section.

To fix the problem, I:

1. Installed the pinentry package with pacman

pacman -S pinentry

 2. Added the line below to ~/.gnupg/gpg-agent.conf specifying pinentry-qt to be used.

pinentry-program /usr/bin/pinentry-qt

 3. Reloaded the agent

gpg-connect-agent reloadagent /bye

If pinentry-qt doesn't work then perhaps one of the other pinentry will, so perhaps swap between the different pinentry files in /usr/bin

Thanks for reading!

Comments