gpg isn't able to open pinentry dialogue when triggered via gui

146 views
Skip to first unread message

Kai Lemke

unread,
Jul 9, 2018, 7:30:23 PM7/9/18
to nix-...@googlegroups.com
Dear all,

on my current installation gpg cannot trigger pinentry dialogue when
called from a gui (I tried dmenu and browserpass), if called from
terminal everything's fine - even if I call passmenu from terminal,
passmenu is able to trigger pinentry.

The process information (`ps auxwww | grep pass`) is equal in both
situations except that of course tty is ? and process is not marked as
foreground whend called from gui.
When launched from gui I never see a gpg process.

I would be very grateful for suggestions.

My system information:

- system: `"x86_64-linux"`
- host os: `Linux 4.14.53, NixOS, 18.03.132821.56fad146a12 (Impala)`
- multi-user?: `yes`
- sandbox: `no`
- version: `nix-env (Nix) 2.0.4`
- channels(root): `"nixos-18.03.132821.56fad146a12"`
- nixpkgs: `/nix/var/nix/profiles/per-user/root/channels/nixos/nixpkgs`


My configuration is something like:

{ config, pkgs, ... }:

{
imports =
[ ./hardware-configuration.nix
];

programs = {
browserpass.enable = true;
};

services = {
xserver = {
enable = true;
layout = "de";
xkbVariant = "neo";
displayManager.slim.enable = true;
windowManager.dwm.enable = true;
xautolock = {
enable = true;
locker = "/run/wrappers/bin/slock";
nowlocker = "/run/wrappers/bin/slock";
time = 5;
};
};
};

security = {
chromiumSuidSandbox.enable = true;
};

nixpkgs = {
config = {
# allow closed source packages
allowUnfree = true;
packageOverrides = pkgs: {
dwm = pkgs.dwm.override {
patches = [ ./patches/dwm.diff ];
};
dmenu = pkgs.dmenu.override {
patches = [ ./patches/dmenu.diff ];
};
# this should not be needed, but I tried explicitly
pass = pkgs.pass.override {
dmenu = pkgs.dmenu;
x11Support = true;
xclip = pkgs.xclip;
xdotool = pkgs.xdotool;
};
};
};
};

environment = {
systemPackages = with pkgs;
[
gnupg
pass
dmenu
chromium
( firefox.override { extraNativeMessagingHosts = [ browserpass
]; } )
];
};

system.stateVersion = "18.03";
}

Thank you very much!


Sincerely Kai

Kai Lemke

unread,
Jul 10, 2018, 5:46:52 AM7/10/18
to nix-...@googlegroups.com
Hi all,


> on my current installation gpg cannot trigger pinentry dialogue when
> called from a gui (I tried dmenu and browserpass), if called from
> terminal everything's fine - even if I call passmenu from terminal,
> passmenu is able to trigger pinentry.

Adding `pinentry-program /run/current-system/sw/bin/pinentry` to
gpg-agent.conf, installing pinentry explicitly and restarting the
graphical environment fixed it.

I already tried before but only restarted gpg-agent which had no effect.


Sincerely Kai

Kai Lemke

unread,
Jul 11, 2018, 5:51:31 PM7/11/18
to nix-...@googlegroups.com
I"m afraid having to re-open this issue, but the problem reoccurred
though I switched to the new configuration.

Has anybody suggestions?


Thanks a lot! Kai
Reply all
Reply to author
Forward
0 new messages