Debian – Usage of pinentry with keepass2 for gpg mail encryption

debianencryptiongpggpg-agentpassword

Debian Jessie, XFCE 4.10, KeePass2, IceDove (with Enigmail)..

I'm using KeePass2 generated passwords for my gpg private key, to de/encrypt mails. Icedove is my client which uses the enigmail.

As soon as I want to de/encrypt a mail pinentry (pinentry-gtk2) pops up and I can't paste into the password field, nor can I move it – thus I'd like to have KeePass2 auto-type my long-ass password for me. Which does not work with the keyboard shortcut (working for anything else), but with a right-click in the KeePass2 entry for 'perform auto-type'.

this is slowly driving me nuts.. I've now read a ton of forum discussions – where none were really helpful and tried to alter my gpg-agent settings to use pinentry-curses. I even removed pinentry-gtk2 which rendered icedove completly incapable of de/encryption.

Any suggestions to make the auto-type feature or paste working in the pinentry window. Or an alternative pinentry?

Best Answer

In Keepass2, "Add Entry," and set "Title" to "GPG." Move from "Entry" tab to "Auto-Type" tab. Select "Override default sequence" and set to "{PASSWORD}".

Before you send email, open Keepass2 with Keepass2 password. Ask IceDove with Enigmail to "Send" and pinentry should appear (locking keyboard, preventing "Ctrl+V" (or any other keyboard shortcut you normally use to perform auto-type), preventing switch windows "Alt+Tab", etc.).

Use mouse to highlight "GPG" entry in Keepass2 and click "Perform Auto-Type" icon in Keepass2 (left of "Find" icon and underneath "Help" menu). As the keyboard "focus" was last on the pinentry text input box, Keepass2 will now start typing your long password for you.

Use mouse to click "OK" on pinentry. Done!

For more details on "Auto-Type" (http://keepass.info/help/base/autotype.html).