Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

pinentry-gtk2 #263

Closed
fhdhsni opened this issue Jun 3, 2017 · 15 comments
Closed

pinentry-gtk2 #263

fhdhsni opened this issue Jun 3, 2017 · 15 comments

Comments

@fhdhsni
Copy link

fhdhsni commented Jun 3, 2017

pinentry-gtk2 sometimes works, sometimes doesn't. Sometimes it pops up for the first time but not for the second time (re-enter of passphrase). Same system in i3wm doesn't have this problem. I recorded a video to show what I mean. pinentry-qt doesn't have this problem.

I'm on Arch linux.
GNU Emacs 25.2.1 (x86_64-unknown-linux-gnu, GTK+ Version 3.22.10) of 2017-04-22
For exwm I'm using master branch.
And for pinentry-gtk-2 it's
pinentry-gtk2 (pinentry) 1.0.0
Copyright (C) 2016 g10 Code GmbH

@ch11ng
Copy link
Owner

ch11ng commented Jun 3, 2017

Emacs has native support for pinentry-tty (might not be this name on Arch) so I'd encourage you to switch to that. Anyway this is a problem and I'll try to fix it.

@tumashu
Copy link
Contributor

tumashu commented Jun 4, 2017

If you open a new emacs session, pinentry-gtk2 seem to work.

@Stebalien
Copy link
Contributor

Stebalien commented Jun 6, 2017

On arch, there's pinentry-emacs (although I believe you need to enable pinentry in emacs first with (pinentry-start t)).

@ch11ng
Copy link
Owner

ch11ng commented Jun 11, 2017

Just tried to reproduce the problem but failed. I also tried hiding the mode line of floating X windows but it didn't make any difference. Do you have issue with other floating X window?

@fhdhsni
Copy link
Author

fhdhsni commented Jun 11, 2017

@ch11ng No. I haven't encounter any problem other than that.

@ch11ng
Copy link
Owner

ch11ng commented Jun 18, 2017

Just an update: I didn't reproduced the problem with the same version of pinentry-gtk2 and Emacs 25.2.1 built according to the instructions from Arch's PKGBUILD.

Could you try a minimal configuration (with other features and optional EXWM modules disabled)?

@tumashu
Copy link
Contributor

tumashu commented Jun 21, 2017

My machine have the same problem, pinentry-gtk2 can input password, but if I open a new emacs, it works

@ghost
Copy link

ghost commented Jun 21, 2017

I was able to route around this issue by adding pinentry-program /usr/bin/pinentry-emacs to $HOME/.gnupg/gpg-agent.conf

@arunisaac
Copy link

Unlike fhdhsni, pinentry-gtk-2 never works for me -- not even once or twice...

I have made a little progress debugging it. Perhaps, someone here can say more.

On executing

echo GETPIN | /path/to/pinentry-gtk-2

I get the following error message:

OK Pleased to meet you

** (pinentry-gtk-2:23241): CRITICAL **: could not grab keyboard: not viewable (3)

** (pinentry-gtk-2:23241): WARNING **: it took 4097 tries to grab the keyboard

** (pinentry-gtk-2:23241): CRITICAL **: could not grab pointer: not viewable (3)

** (pinentry-gtk-2:23241): WARNING **: it took 4097 tries to grab the pointer
ERR 83886179 Operation cancelled <Pinentry>

@ch11ng
Copy link
Owner

ch11ng commented Jul 9, 2017

@arunisaac pinentry-gtk-2 also complains on my machine that it has to retry several times before grabbing the keyboard. This is one possible cause for the original issue. Does the problem persist when calling pinentry-gtk-2 with -g (which disables the grabbing behavior)?

@arunisaac
Copy link

Indeed, it works now with -g flag. I also tested with no-grab added to my ~/.gnupg/gpg-agent.conf. It works with that too. :-)

However, man gpg-agent warns that no-grab "should in general not be used to avoid X-sniffing attacks". So, it remains important to fix the underlying issue in exwm.

@ch11ng
Copy link
Owner

ch11ng commented Jul 16, 2017

I'm on Debian and Debian has patched pinentry in response to the following bug reports:

This explains why I have never reproduced the issue. @fhdhsni @arunisaac you probably get fast machines so pinentry-gtk-2 easily fails. I believe this is not a bug of EXWM. You need to push your distro or upstream to fix the problem.

@fhdhsni
Copy link
Author

fhdhsni commented Jul 16, 2017

@ch11ng Thank you for all you've done and the time you put on this awesome project. ❤️

@fhdhsni fhdhsni closed this as completed Jul 16, 2017
@arunisaac
Copy link

@ch11ng Sure, I'll do that. Thank you!

bendlas added a commit to bendlas/nixpkgs that referenced this issue Aug 12, 2017
fpletz pushed a commit to NixOS/nixpkgs that referenced this issue Aug 21, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

5 participants