pinentry-gtk-2 refuses input when GTK_IM_MODULE=scim
Closed, ResolvedPublic

Description

http://thread.gmane.org/gmane.comp.encryption.gpg.devel/14423

suggests that the GTK-2 pinentry gets no keyboard input when scim is installed
and GTK_IM_MODULE=scim. Testing today with 0.9.0, i see the same problem.

What should users do who need to use scim or some alternate keyboard entry for
passwords?

Details

Version
0.9.2
dkg added a subscriber: dkg.
dkg added a comment.Apr 14 2015, 3:36 PM

This is still an issue with pinentry 0.9.1

dkg set Version to 0.9.1.Apr 14 2015, 3:36 PM
dkg changed Version from 0.9.1 to 0.9.2.May 13 2015, 11:58 PM

pinentry GTK-2 is still failing to accept any keyboard input when invoked with
GTK_IM_MODULE=scim

dkg added a comment.May 14 2015, 12:01 AM

On a debian system, i did:

   apt install --no-install-recommends scim scim-gtk-immodule

Here is a transcript of pinentry being invoked: there is additional scim-related
output:

0 dkg@alice:~$ GTK_IM_MODULE=scim pinentry-gtk-2
OK Your orders please
GETPIN
Loading simple Config module ...
Creating backend ...
Loading socket FrontEnd module ...
Starting SCIM as daemon ...
Loading socket Config module ...
Creating backend ...
Loading x11 FrontEnd module ...
GTK Panel of SCIM 1.4.15

Starting SCIM as daemon ...

at this point, no keyboard entry works in the module at all.

This is https://bugs.debian.org/750521

neal added a subscriber: neal.May 16 2015, 6:57 PM

Thanks for the great minimal working example.

I tried to reproduce this and I could.

However, when I run

  GTK_IM_MODULE=scim gedit

I can't enter any text either. I have to activate scim by pressing it's hotkey
(control-space). Then I can type as usual. pinentry grabs the keyboard to
prevent other applications from snooping the password. I guess this is
inhibiting scim/scim bridge from accessing the keyboard input.

neal added a comment.May 16 2015, 7:08 PM

This might also be due to our custom secure entry widget. See this bug report:

T1239

neal added a comment.May 18 2015, 11:33 AM

If I disable the secure entry widget (see patch) and start pinentry as follows:

  GTK_IM_MODULE=scim gtk+-2/pinentry-gtk-2

then I'm able to enter text in the same way as with gedit.

This means that the problem is not due to grabing the keyboard, but most likely
due to our secure entry widget. Note: the secure entry widget is based on a
2004 copy of GtkEntry so it's not surprising that it doesn't support some modern
features.

dkg added a comment.May 19 2015, 8:22 PM

So what should we do about this? Do we need to keep gtksecentry.* in sync with
upstream's gtkentry somehow?

werner added a subscriber: werner.May 22 2015, 3:08 PM

We implemented support for the GTK_IM_MODULE ebvar before 2007 thus I think this
is more likely a regression. In fact I recall that Marcus once showed me a
problem with his SCIM installation while using Pinentry.

I replaced our custom entry widget with the standard Gtk+ widget. This should
fix this problem. Please test and let me know either way. Thanks!

0.9.6 has been released - does it work?

neal closed this task as Resolved.Nov 18 2015, 11:28 AM
neal claimed this task.

Given the amount of time since the request for testing, I don't think we are
going to get a response. As such, I'm going to close this issue and mark it as
resolved. If there is still a problem please either reopen this bug report or
file a one. Thanks.

dkg added a comment.Nov 18 2015, 3:47 PM

I've just tested 0.9.6 using the same procedure as T1777 (dkg on May 14 2015, 12:01 AM / Roundup), and i have no
problem entering text either. I think this is resolved. sorry for the delay in
feedback.

dkg reopened this task as Open.Nov 18 2015, 3:47 PM
neal added a comment.Nov 18 2015, 5:19 PM

dkg: No worries. Thanks for testing.

neal closed this task as Resolved.Nov 18 2015, 5:19 PM