We have moved to a new Sailfish OS Forum. Please start new discussions there.

[SOLVED] GnuPG2 unusable without 'pinentry' package (unavailable)

asked 2013-12-25 20:46:54 +0300

Mced gravatar image

updated 2015-10-05 13:00:25 +0300

GnuPG was a must have in my N900. In Sailfish/Mer repositories, it is replaced by GnuPG2. No problem about that, but:

-GnuPG2 depends on GnuPG-Agent.

-GnuPG-Agent depends on pinentry-ncurses or a graphical pinentry (pinentry-gtk2 or pinentry-qt4). No pinentry, no password input.

And there's no pinentry available in repositories. So, I can't generate keys (needs password input). If I just import other keys, I can encrypt data; but no decrypt is possible (again, needs password input!).

So, in order to encrypt sensible data (passwords!), a pinentry package is needed. Thanks.

Update: Pinentry RPM packages already available. See Objectifnull and Nieldk answers.

edit retag flag offensive close delete

2 Answers

Sort by » oldest newest most voted

answered 2014-01-04 11:04:29 +0300

Mced gravatar image

WORKAROUND: Compiling and installing your own Pinentry.

(I can write it in Spanish if anyone needs it - Puedo escribirlo en español si alguien lo necesita)

This one in meant to be a temporary solution, until Jolla/Mer people upload a Pinentry package to the official repos. Both programs are exactly the same, but official packages will benefit of automatic security updates.

Developer mode must be enabled.

Android users: don't try this at home :P

1-- Open terminal. Install some handy packages. When asked, say "yes" (y):

pkcon install gcc make ncurses-devel gcc-c++

2-- Using your browser, download Pinentry "tarball" and save it somewhere. I chose "Downloads" folder.


(Tested with 0.7.3. May work with other versions. You must download one of the blahblahblah.tar.gz "big" files. Those other ones, diff.gz, sig, bz2, etc are not needed)

3-- Return to Terminal. "Move" to the target folder:

cd Downloads

4-- Tar.gz are compressed files like ZIP or RAR. To decompress and extract files:

tar zxf pinentry-blahblahblah

(Terminal hint: just type pinentry, press TAB and the shell will autocomplete file's name)

5-- Move in:

cd pinentry-blahblahblah (apply the same #4 hint)

6-- "Configure" (no TAB trick here, sorry; you must enter this line without mistakes):

./configure --enable-pinentry-curses --disable-pinentry-gtk2 --disable-pinentry-qt --without-x

After some blahblah from the terminal (hint: keep your Jolla active or it will go to sleep), it will show a message like this:

configure: Pinentry v(your version) has been configured as follows: (some config info)

If not, an error has happened.

7-- Let's compile, yeah!


(Lots of blahblah. No "OK" final message, just "leaving" and "entering" directories. If there's anything wrong, it will send an "error")

8-- Log in as root: type devel-su and your Nemo's password.

9-- Let's install:

make install

10-- Add a handy link:

ln -s /usr/local/bin/pinentry-curses /usr/bin/pinentry

11-- Return to normal user and you're done. Now GnuPG will succeed when asking for passwords.


If Pinentry official package is finally available, you probably want to uninstall "our" Pinentry in order to avoid conflicts. Using the terminal, log in as root, move to the uncompressed directory and type:

make uninstall
edit flag offensive delete publish link more


Worked fine, thanks. Note that gpg can be used to encrypt files as follows:

gpg2 -c test.txt # this generates test.txt.gpg
gpg2 test.txt.gpg # this recreates the original file test.txt

To encrypt folders, just use tar to create a single file before feeding that to gpg2 -c.

Rolfa ( 2014-05-12 17:43:55 +0300 )edit

answered 2015-09-29 17:59:11 +0300

objectifnul gravatar image


edit flag offensive delete publish link more



Thanks a lot!

Mced ( 2015-10-03 08:39:27 +0300 )edit
Login/Signup to Answer

Question tools



Asked: 2013-12-25 20:46:54 +0300

Seen: 1,235 times

Last updated: Oct 05 '15