[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: Pinentry in emacs without X doesn't work reliably
From: |
Tassilo Horn |
Subject: |
Re: Pinentry in emacs without X doesn't work reliably |
Date: |
Fri, 08 Jul 2016 19:53:35 +0200 |
User-agent: |
Gnus/5.13 (Gnus v5.13) Emacs/25.1.50 (gnu/linux) |
HASM <hasm@example.invalid> writes:
Hi HASM,
>> Now the problem is, that my keyboard input doesn't seem to get thru
>> to that pinentry dialog reliably.
>
> Did you install gnugp-1 on your system?
Nope, but that should work with GnuPG-2, too.
> Did you have or create this file
> ~/.gnupg/gpg-agent.conf
> and have/add these lines into it:
> allow-emacs-pinentry
> pinentry-program /usr/bin/pinentry-emacs
> (replace the path above to where your pinentry-emacs is)?
Ah, cool. That and installing the pinentry ELPA package made the thing
work! Now my ~/.gnupg/gpg-agent.conf on the server is
--8<---------------cut here---------------start------------->8---
daemon
allow-emacs-pinentry
enable-ssh-support
max-cache-ttl 14400
max-cache-ttl-ssh 14400
default-cache-ttl 7200
default-cache-ttl-ssh 14400
pinentry-program /usr/bin/pinentry-emacs
--8<---------------cut here---------------end--------------->8---
> Did you add these lines to your emacs initialization:
> (load "pinentry")
> (pinentry-start)
> (setq epg-gpg-program "gpg")
> (or use customize instead of the last line)?
Since I installed it via ELPA, I can just call (pinentry-start) without
loading before. And `epg-gpg-program' is "gpg2" here.
But I wonder if
pinentry-program /usr/bin/pinentry-emacs
is the right thing to do. What if some other program needs a pinentry?
The pinentry ELPA package description doesn't say I need that line.
https://elpa.gnu.org/packages/pinentry.html
However, when I remove that line, I get an error that there's no
pinentry program.
I hoped that allow-emacs-pinentry would somehow use pinentry-emacs if
running inside emacs and some other pinentry program for non-emacs
programs.
Daiki, since you've made the thing, do you have a clue what else I might
need? I'm running gnupg-2.1.13 and pinentry-0.9.7, so according to the
pinentry ELPA package docs, those versions should be recent enough. Or
maybe it's the other way round and pinentry-emacs spawns the right
pinentry depending on if we're running inside emacs? Then that we need
to also set the pinentry-program to pinentry-emacs should be documented.
Bye,
Tassilo