pinentry-qt4 doesn't prompt for a password when trying to read an encrypted email in Kmail

Bug #371178 reported by Gustavo Narea
44
This bug affects 8 people
Affects Status Importance Assigned to Milestone
KDE PIM
Won't Fix
Medium
pinentry-qt4 (Ubuntu)
Confirmed
Undecided
Unassigned

Bug Description

Binary package hint: pinentry-qt4

I'm running Kubuntu 9.04 and when I try to read an encrypted email in Kmail, I get an error that says that the password is wrong, although there was no password prompt.

I thought that pinentry-qt was missing, but actually pinentry-qt4 was installed.

A workaround is to install pinentry-qt (not pinentry-qt4).

Gustavo Narea (gnarea)
summary: - pinentry-qt4 doesn't prompts for a password when trying to read an
+ pinentry-qt4 doesn't prompt for a password when trying to read an
encrypted email in Kmail
Revision history for this message
In , Teke (teke) wrote :

Version: 1.13.5 (using Devel)
OS: Linux

When trying to send a message marked for signing, the pinentry dialog box flickers very quickly for a few seconds (so quickly so that I can only see its title) and then I get a dialog "Signing failed: Bad passphrase". If I try pinentry on the command line it works (I just give it the command GETPIN).

(I am not sure that I really use SVN or Snapshot Version. KDE reports itself as having version 4.4.5 and I have picked it up from kubuntu-ppa.)

Reproducible: Always

Steps to Reproduce:
1. Create new mail and click Sign.
2. Send mail.

Actual Results:
Pinentry dialog box flickers back and forth between visibility and invisibility for a few seconds.

Expected Results:
Dialog should show so that I can input password of GPG key.

Revision history for this message
Torsten Ekedahl (teke-lp) wrote :

I get the same behaviour for Kubuntu 10.10 (pinentry-qt4 0.8.0-1). You can see pinentry flickering very quickly a few times before it gives up and you get the error message. The same thing happens with thunderbird instead of kmail. I tried out pinentry a few times by hand (running it from the command line and putting in commands to it directly) but wasn't able to reproduce the problem in that fashion. Using pinentry-qt instead solves the problem for me too.

Revision history for this message
Pau Garcia Quiles (pgquiles) wrote :

This bug only happens if you use Qt4 installed from packages. If you download Qt from Nokia and set your LD_LIBRARY_PATH and PATH to use that version of Qt4, pinentry-qt4 works fine. Maybe this is a bug in some qt-copy or kubuntu patch?

tags: added: gpg-agent
Revision history for this message
luigi.mantellini@gmail.com (comio) wrote :

same problem here

Revision history for this message
Pavel Malyshev (afunix) wrote :

KUbuntu 10.10 still has this bug

Revision history for this message
Craig Magina (craig.magina) wrote :

This also appears to be an issue in Kubuntu 11.04 amd64.

Revision history for this message
Johannes Ranke (jranke) wrote :

I just had the first problem (Kubuntu 10.10). I believe I followed outdated instructions on the web. I then followed

http://wiki.aptosid.de/index.php/Verschlüsselung_in_kmail_einrichten

(sorry, German only) and then pinentry-qt4 worked as expected. Only after reading the tutorial I understood that in an up-to-date KDE4 system, the gpg-agent is automatically started if it is enabled in ~/.gnupg/gpg.conf or ~/.gnupg/options at login time. I also changed the content of ~/.gnupg/gpg-agent.conf to

# ~/.gnupg/gpg-agent.conf
pinentry-program /usr/bin/pinentry-qt4
no-grab
default-cache-ttl 86400
max-cache-ttl 86400

Revision history for this message
M (ytzemih) wrote :

Can confirm this for Kubuntu 11.04 amd64 . Pinentry either doesn't show or a popup appears and immediately disappears again.

Changed in kdepim:
importance: Unknown → Medium
status: Unknown → New
Revision history for this message
In , M (ytzemih) wrote :

Can confirm this bug for Kubuntu 11.04 amd64

Revision history for this message
In , kaputtnik (kaputtnik-deactivatedaccount) wrote :

confirm this Bug with KMyMoney and Konsole:

typing: echo "test" | gpg -ase -r 0x791E0AAA | gpg

will shortly display the pinentry-Dialog.

Revision history for this message
In , kaputtnik (kaputtnik-deactivatedaccount) wrote :

Installing pinentry-gtk2 solves my Problem with KMymoney.

Revision history for this message
In , kaputtnik (kaputtnik-deactivatedaccount) wrote :

sorry, but it works also fine with pinentry-qt4, didn't know why.
Using Kubuntu 11.04 with kde 4.6.2

You have to control:
 1. File "~/gnupg/gpg.conf" must have an entry "use-agent"
 2. File "~/gnupg/gpg-agent.conf" must have an entry "pinentry-program /usr/bin/pinentry-qt4"

IMHO thats all. There is an bug on kpgp, or gpg, or gpg-agent, while there are no default Config-Files in the Folder "~/.gnupg". In kpgp you could automatically create the configfile "~/gnupg/gpg.conf" by selecting a configfolder but accepting the default.

For me its solved :-)

Revision history for this message
kaputtnik (kaputtnik-deactivatedaccount) wrote :

Had the same Problem. but now its solved for me.

Look at http://bugs.kde.org/show_bug.cgi?id=245288#c4

Revision history for this message
In , Husimon (husimon) wrote :

unfortunately, I have put my observations in the wrong thread! Sorry for that. The problem with pinentry-qt4 (input dialog window foe entering passphrase) still persists. Using Kmail alone is fine as long as I use pinentry-gtk-2 for Encryption, Signing or Decryption (of course with gpg-agent.conf setup to include the statements supplied above. The complete system break-down occurs as soon as kleoptatra is installed (its "use-agent" dependency is fixed and points to pinentry-qt4). No amount of configuration tuning helps to get the pinentry-qt4 input window to come to fore and accept any meaningful entry. The work-around to replace pinentry-qt4 with pinentry-gtk-2 fails too. As a result no encryption or decryption is possible with kleopatra installed together with kmail. I had to remove the package kleopatra to get the kmail up and running again with pinentry-gtk-2.

Kubuntu 11.04 (all updates till date installed)
KMail Version 1.13.6
under KDE Plattform-Version 4.6.2 (4.6.2)

Changed in pinentry-qt4 (Ubuntu):
status: New → Confirmed
Revision history for this message
Joshua Kugler (jkugler) wrote :

Same problem here. Kmail 1.13.6 (4.4.10 package) under KDE 4.7.0.

GPG agent conf:

pinentry-program /usr/bin/pinentry-qt4
no-grab
# 24 hours
default-cache-ttl 86400

###+++--- GPGConf ---+++###
log-file /home/jkugler/logs/gpg_agent.log
###+++--- GPGConf ---+++### Mon 01 Mar 2010 06:40:29 PM AKST
# GPGConf edited this configuration file.
# It will disable options before this marked block, but it will
# never change anything below these lines.

The "fix" mentioned in comment 8 did not apply, because I already had the settings it said to add.

Revision history for this message
Joshua Kugler (jkugler) wrote :

For the record:

pinentry-qt is not available in 11.04, so that work around doesn't work.

Also, using pinentry-x11 fails similarly to pinentry-qt4 (flashes, but doesn't prompt). And the same errors in .xsession-errors:

X Error: BadWindow (invalid Window parameter) 3
  Major opcode: 2 (X_ChangeWindowAttributes)
  Resource id: 0x7800131
X Error: BadWindow (invalid Window parameter) 3
  Major opcode: 2 (X_ChangeWindowAttributes)
  Resource id: 0x7800138
X Error: BadWindow (invalid Window parameter) 3
  Major opcode: 2 (X_ChangeWindowAttributes)
  Resource id: 0x7800138

Revision history for this message
Joshua Kugler (jkugler) wrote :

Oh, and pinentry-gtk-2 does work for me.

Revision history for this message
In , W1yo2624ebi-darw2l-lo8mzs0dn9h (w1yo2624ebi-darw2l-lo8mzs0dn9h) wrote :

I had the same issue. Like others, I too had both gpg and gpg-agent correctly configured, but still it didn't work. As others have mentioned, pinentry-gtk-2 worked perfectly fine.

After lots of debugging, I found that pinentry-qt4 crashes inside ibus.

In my case, the problem was that GTK_IM_MODULE/QT_IM_MODULE/XMODIFIERS were set (to ibus) when gpg-agent was launched (by a script in .kde/env). However, at the time gpg-agent is launched, a full KDE session isn't available. For example, I don't think the session dbus has been started yet. This apparently causes problems in ibus.

I worked around the problem by modifying the gpg-agent script in .kde/env to this:

#!/bin/sh
eval `GTK_IM_MODULE="" QT_IM_MODULE="" XMODIFIERS="" gpg-agent --daemon`

With this, pinentry-qt4 no longer crashes, although it obviously means you can't use other input methods.

It does look really ugly though, as it's using some kind of default widget theme. Probably also related to the fact that gpg-agent is launched "too early".

Revision history for this message
In , Peter Wu (lekensteyn) wrote :

This is a bus in ibus-qt, a patch is available at:
http://code.google.com/p/ibus/issues/detail?id=1504
This is not an issue of KDE, so this issue can be closed I guess.

Revision history for this message
In , Montel-3 (montel-3) wrote :

oki will close it

Changed in kdepim:
status: New → Won't Fix
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.