You are not logged in.

#1 2023-01-19 23:50:09

mehdi.essalehi
Member
Registered: 2023-01-19
Posts: 10

[SOLVED] KWallet pinentry not showing up

I'm currently on KDE and encountered a problem with pinentry. I'm trying to use pinentry-kwallet as the default pinentry program but the password prompt doesn't show up, for example when signing commits. pinentry-qt works fine.

I tested this command

echo GETPIN | pinentry-kwallet

but it does not work and fails with this error:

OK ready to listen to your demands
ERR 14 no coprocess

This is the content of ~/.gnupg/gpg-agent.conf

pinentry-program /usr/bin/pinentry-kwallet

I tried to search online with no luck.

Thank you in advance

Last edited by mehdi.essalehi (2023-01-20 20:02:07)

Offline

#2 2023-01-20 09:09:23

seth
Member
From: Won't reply 2 private help req
Registered: 2012-09-03
Posts: 77,160

Re: [SOLVED] KWallet pinentry not showing up

Does

qdbus | grep wallet

indicate that kwallet is listening on the session bus?
(I've no idea what I'm talking about, but it sounds like pinentry-kwallet is meant to IPC kwallet and that fails)

Offline

#3 2023-01-20 12:16:02

mehdi.essalehi
Member
Registered: 2023-01-19
Posts: 10

Re: [SOLVED] KWallet pinentry not showing up

This is the output of the command:

org.kde.kwalletd5

So I guess it is indeed listening to the session bus.

Offline

#4 2023-01-20 12:58:54

seth
Member
From: Won't reply 2 private help req
Registered: 2012-09-03
Posts: 77,160

Offline

#5 2023-01-20 14:40:57

mehdi.essalehi
Member
Registered: 2023-01-19
Posts: 10

Re: [SOLVED] KWallet pinentry not showing up

I already tried that solution but it does not work. I still get the same message when I try the pin command or try to make a signed git commit.

Offline

#6 2023-01-20 14:49:26

seth
Member
From: Won't reply 2 private help req
Registered: 2012-09-03
Posts: 77,160

Re: [SOLVED] KWallet pinentry not showing up

Ftr, https://manpages.ubuntu.com/manpages/xe … let.1.html
The thing seems to be a shim that queries kwallet first and then runs a fallback pienentry.
Try

export PINENTRY=/usr/bin/pinentry-qt
echo GETPIN | pinentry-kwallet

Offline

#7 2023-01-20 17:54:49

mehdi.essalehi
Member
Registered: 2023-01-19
Posts: 10

Re: [SOLVED] KWallet pinentry not showing up

pinentry-qt doesn't fit my needs because the password won't be saved in kwallet. I need pinentry-kwallet and this solution only manages to make a fallback pinentry program if pinentry-kwallet fails which is not what I want.

Offline

#8 2023-01-20 19:10:15

seth
Member
From: Won't reply 2 private help req
Registered: 2012-09-03
Posts: 77,160

Re: [SOLVED] KWallet pinentry not showing up

TFM wrote:

pinentry-kwallet replaces the regular pinentry-program stanza set in ~/.gnupg/gpg-agent.conf
     and looks up the passphrases requested in the KWallet first, falling back to pinentry only
     if not found.  The user is given the option to store it in the KWallet afterwards.  Negative
     answers to this are also stored in the KWallet to avoid asking each time.

pinentry-kwallet exits 1 if it is called recursively

PINENTRY  The pinentry programme to use.  Default: “pinentry”

idk whether or not "The user is given the option to store it in the KWallet afterwards." fails for you and unspecified reasons, but if you're intentionally calling pinentry-kwallet recursively by making it the PINENTRY that's certainly not going to get you an interactive pinentry (after failing to get the pin out of the wallet)
At least not according to the manual.

Offline

#9 2023-01-20 20:01:16

mehdi.essalehi
Member
Registered: 2023-01-19
Posts: 10

Re: [SOLVED] KWallet pinentry not showing up

Okay, my bad. I misunderstood how pinentry-kwallet worked. I thought that pinentry-kwallet doesn't need another pinentry program and shows its own GUI.
Thank you for your help

Offline

Board footer

Powered by FluxBB