This forum has been archived. All content is frozen. Please use KDE Discuss instead.

KGpg/pinentry-qt4 - Pass phrase entry potentially visible.

Tags: None
(comma "," separated)
metzman
Registered Member
Posts
171
Karma
3
OS
Hi Guys,

PGP encrypted file. Using 'View file decrypted' from Dolphin, KGpg (in editor mode) is launched with pinentry-qt4 to handle the input of the pass phrase. However(!), pinentry-qt4 does not receive focus, KGpg does.

User beware. - It is just so easy to not immediately realise this and begin typing ones pass phrase, erm, ahem, in the KGpg editor window, plain text and visible...

On the KGpg editor window and pinentry-qt4 dialogue window I have tried all 16 possible combinations of the special window settings, 'Focus stealing prevention' and 'Accept focus'. All to no avail.

User error? Config error? Bug?

Strictly speaking, a user error I suppose... :< Although in this instance, I do believe that pinentry-qt4 should most definitely have, and retain, focus.

Just for info:
openSUSE 12.3
KDE 4.11.1
KGpg 4.11.1-62.1
pinentry 0.8.1-18.1.1
User avatar
bcooksley
Administrator
Posts
19765
Karma
87
OS
Rather unusual - on my system pinentry-qt4 is extremely aggressive in acquiring keyboard focus, to the extent it bypasses the usual "Window is focused receives all input" and force captures the keyboard.

Have you tried removing all window rules specific to KGpg and Pinentry-Qt4 and allowing default KWin policies to apply? Also, what level of focus stealing prevention are you using? If it is high, try setting it to low.


KDE Sysadmin
[img]content/bcooksley_sig.png[/img]
metzman
Registered Member
Posts
171
Karma
3
OS
Hi bcooksley,

First off, thanks for the response. :)
bcooksley wrote:Have you tried removing all window rules specific to KGpg and Pinentry-Qt4 ... what level of focus stealing prevention are you using?...

Already removed the window rules after finding I couldn't change the behaviour. The default window behaviour is 'Click to Focus' and 'Low' focus stealing prevention.

Pinentry-qt4 is definitely not getting focus, no matter what the focus stealing is set to. There is however a slight difference in behaviour when changed from 'None | Low | Medium' to 'High | Extreme', as the following two (slightly redacted) screen captures illustrate.

This is with the default settings, as I had been using. Having chosen 'View file decrypted' as soon as the KGpg/Pinentry-qt4 windows opened I immediately typed 'passphrase'. As you can see, it is the KGpg editor window that has focus and keyboard input.
Image

Changing to 'High | Extreme' results in Dolphin retaining focus. The KGpg editor window is open, but below Dolphin.
Image

In both cases though, Pinentry-qt4 does not get focus unless one 'Clicks to Focus'.

bcooksley wrote: ... on my system pinentry-qt4 is extremely aggressive in acquiring keyboard focus ...

I see you're also using SUSE, same version or factory? I have a fairly standard, all updates applied, openSUSE 12.3 / KDE 4.11.1 set-up. I'm not aware of any other settings I may have changed that would influence focus behaviour. I would like to find the cause of this, but :-\

Edit:
Been Googling around a bit more... Found a post at http://bugs.debian.org/cgi-bin/bugrepor ... =581617#47 which matches the behaviour I'm seeing, but that was back in March 2011. The major version number is the same though, pinentry-qt4 0.8.1... Searching on KDE Bug Tracking turns up nothing of interest... ???
User avatar
bcooksley
Administrator
Posts
19765
Karma
87
OS
My system isn't standard, as it most of KDE is self-compiled.
I can confirm my settings are the same however.

Does this behaviour occur under a new user by any chance?


KDE Sysadmin
[img]content/bcooksley_sig.png[/img]
metzman
Registered Member
Posts
171
Karma
3
OS
bcooksley wrote: ... Does this behaviour occur under a new user by any chance?

I had already tried logging in as another (existing) user, the behaviour was the same. So I reasoned that ruled out anything I may have changed below ~/.kde4 ...
Created a new user, generated a key pair ... works as it should do - pinentry-qt4 gets focus ... excellent, so what's different?

The two existing user's home directories I had retained when migrating from Kubuntu 12.04LTS to openSUSE 12.3. I didn't retain ~/.config, ~/.local or ~/.kde ...
Of course, what I had retained, :< was ~/.gnupg

The original gpg.conf I had set-up so gpg-agent was used, as I wanted to control ttl of the the passphrase cache.
Looking at gpg-agent.conf I found a line added by, I assume KGpg:
Code: Select all
pinentry-program /usr/bin/pinentry-qt4

Good. OK that's fine... however there was also:
Code: Select all
no-grab

A quick 'man gpg-agent' and I find: "Tell the pinentry not to grab the keyboard and mouse." :D
Commented out 'no-grab' - logout - restart - Perfect!! No problem with Thunderbird/Enigmail either.

'bcooksley' Thank you very much :) (a lesson learnt)


Bookmarks



Who is online

Registered users: Bing [Bot], daret, Google [Bot], Sogou [Bot]