Pinentry curses fallback for gpg
John Lane
gnupg at jelmail.com
Thu Oct 16 22:02:43 CEST 2014
Hello, I am trying to work out a few things with GnuPG that aren't clear
to me after reading the available documentation. I hope it's ok to ask
for some help?
Here's my first problem:
I cannot work our how to tell my desktop-less system to use the curses
pinentry program. I can see that is is configurable for gpg-agent.conf
but I see no equivalent for gpg.conf. The only way I have been able to
do this is to re-point a symlink /usr/bin/pinentry to point to
/usr/bin/pinentry-curses instead of /usr/bin/pinentry-gtk.
I have read the pinentry readme and see the configure options for it. I
have cross checked with how the package is built for Arch Linux, which
is the Linux distribution that I use. The configure options are
./configure --prefix=/usr \
--enable-pinentry-curses \
--disable-pinentry-gtk \
--disable-pinentry-qt \
--enable-pinentry-gtk2 \
--enable-pinentry-qt4 \
--enable-fallback-curses
The installed binaries are like this:
lrwxrwxrwx 1 root root 14 May 6 2013 /usr/bin/pinentry ->
/usr/bin/pinentry-gtk2
-rwxr-xr-x 1 root root 48216 May 6 2013 /usr/bin/pinentry-curses
-rwxr-xr-x 1 root root 107384 May 6 2013 /usr/bin/pinentry-gtk-2
-rwxr-xr-x 1 root root 153064 May 6 2013 /usr/bin/pinentry-qt4
It isn't possible to launch the gtk-2 or qt4 versions without the
requisite libraries being installed, so both fail rather than fall back
to the curses version:
# /usr/bin/pinentry-qt4
/usr/bin/pinentry-qt4: error while loading shared libraries:
libQtCore.so.4: cannot open shared object file: No such file or directory
# /usr/bin/pinentry-gtk-2
/usr/bin/pinentry-gtk-2: error while loading shared libraries:
libgtk-x11-2.0.so.0: cannot open shared object file: No such file or
directory
The curses version works fine. Now, as far as I understand, the gnupg
binary uses the symlink "/usr/bin/pinentry" and, with the above
configuration that means the gtk2 version. And, if the system doesn't
have that installed then it fails.
I can obviously change the symlink to point to the curses version but,
if I do, it'll eventually get reset by my distributions package manager.
As far as I can tell, it's the pinentry package's "make install" that
creates this symlink rather than something distribution-specific.
So, what is the correct, approved way to get gpg to use the curses
pinentry ?
Thanks.
More information about the Gnupg-users
mailing list