As of some update last week (sorry, can’t really be more specific there…but I know it was before the KDE apps 20.04.1 update recently released), every time I log in I now get an error dialog from “kwalletd GPG backend”: “Error when attempting to decrypt the wallet kdewallet using GPG. If you’re using a SmartCard, please ensure it’s inserted then try again. GPG error was No such file or directory”.
I haven’t ever used a SmartCard. Previously I would get a prompt to enter my key’s password to open this wallet when I logged in, and this is how it still is working on my Leap 15.1 install. There are “Retry” and “Cancel” buttons and both have the same effect of just showing the same error dialog again and again. The close button on the dialog also does the same.
I tried looking in journalctl for KDE and especially kwallet or GPG error messages but all I see are two messages “Activating service name=‘org.kde.kwalletd5’” and “Successfully activated service ‘org.kde.kwalletd5’”. Any ideas on either fixing this or at least finding out exactly what file or directory GPG (and hence kwalletd) can’t find?
Ugh. Finally figured it out. I was SSHed into this box a while back and trying to sign a Git tag, and I couldn’t find any other way to get it to work except by putting “pinentry-program /usr/bin/pinentry-curses” in ~/.gnupg/gpg-agent.conf. I also happened to perform an update on the same day and so I was assuming that the update had caused the issue, but it was the fact that I forgot to remove the entry. Of course, the entirely unhelpful “no such file or directory” error didn’t jog my memory.
I tried discarding the wallet files and starting afresh, but was getting the same error. It wasn’t until I tried to generate a new key pair, got the same error, and started poking around in ~/.gnupg to see if I could see something wrong there that I remembered. So thanks for the help which finally got me to remember how I broke it :).
Thanks for that update. I really don’t like that way that “pinentry” is handled. But in special cases, such as your “ssh”, there is probably an environment setting you can make that will die when you logout.
I’ve been working on it again and I can’t get anything to make it prompt on the command line for pinentry except that config. OTOH, now that I’ve got VNC finally working (another frustrating process) I can use that for when I need to sign something.