Ubuntu – GPG-Agent / Enigmail stopped working after upgrade to Ubuntu 15.10


Good day everyone,

I just upgraded to Ubuntu 15.10 using the Software Updater. After reboot I realized that Enigmail (Version 1.2.8.) in Thunderbird (Version 38.3.0) stopped working. I am unable to sign or encrypt mails.

When Enigmail uses gpg (GnuPG) 1.4.18 the following error window appears immediately after pressing the Send button:

Send operation aborted.
Error - bad passphrase

I never even got the dialog to enter the passphrase.
For testing I installed gpg (GnuPG) 2.0.28, reinstalled Enigmail and configured it to use gpg2.
When adjusting the settings in Preferences -> Basic Settings the following error appeared:

Cannot connect to gpg-agent.
Maybe your system uses a specialized tool for passphrase handling
(e.g. gnome-keyring, seahorse-agent, KDE wallet manager, ...).
Unfortunately Enigmail cannot control the passphrase timeout for the tool you are using.
Therefore the respective timeout settings in Enigmail are disregarded.

When trying to send a signed or encrypted mail using gpg2 I get a different error message:

Send operation aborted.
Key 0xXXXXXXXX not found or not valid.
The (sub-)key might have expired

That is simply not true. The keys are present and they have not expired. Curiously, the Enigmail key manager does display the keys correctly.

The underlying problem seems to be with gpg-agent (gpg-agent (GnuPG) 2.0.28). Checking if the agent is running:

> ps ax | grep gpg
6971 ?        Ss     0:00 gpg-agent --daemon

Trying to connect:

> gpg-agent
gpg-agent: can't connect to the agent: IPC connect call failed

> sudo gpg-agent
gpg-agent: no gpg-agent running in this session

Trying to sign a file:

> gpg -s test.txt
[user and key info]
can't connect to `/tmp/gpg-GBtHXS/S.gpg-agent': No such file or directory
gpg: can't connect to `/tmp/gpg-GBtHXS/S.gpg-agent': connect failed


Apparently gpg-agent is not working anymore. My Questions are:

  • Why is gpg-agent not working anymore?
  • How can this be fixed?

Thanks everyone for your time and insight.

Software versions summary:

  • gpg (GnuPG) 1.4.18
  • gpg (GnuPG) 2.0.28
  • gpg-agent (GnuPG) 2.0.28
  • Enigmail 1.2.8.
  • Thunderbird 38.3.0
  • Ubuntu 15.10 wily werewolf

Best Answer

I had a similar problem and solved it by installing pinentry-gnome3 (I'm using Gnome Shell, not Unity):

sudo apt-get install pinentry-gnome3