Comment 18 for bug 371178

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".