Package: pinentry-gnome3 Followup-For: Bug #801247 In my case, it looks like:
gpg-agent is started, and inherits the DBUS_SESSION_BUS_ADDRESS env varible. The gpg-agent persists across login sessions, so that when it starts the gnome3 pinentry the dbus session doesn't correspond with the current desktop session. The practical result of this is that when I log to X first, it works, but if I subsequently logout of my X session and then login again, I see this bug. People who start gpg-agent (or their X server) in different ways are likely to see this problem without session restarts I suppose. To confirm, I get different results from: grep -z -i dbus < /proc/`pidof gpg-agent`/environ vs. grep -z -i dbus < /proc/$$/environ The gpg-agent manual page documents the use of: gpg-connect-agent updatestartuptty /bye to change the TTY and/or X display used for pin entry prompts. I suppose the fix would involve either pinentry-gnome3 getting the dbus session from the X session in some way (if that's possible), or extending the functionality of "updatestartuptty" to also update dbus session used by gpg-agent when starting the pinentry command. Cheers, Tim. -- System Information: Debian Release: stretch/sid APT prefers testing APT policy: (500, 'testing') Architecture: amd64 (x86_64) Foreign Architectures: i386 Kernel: Linux 4.6.0-1-amd64 (SMP w/4 CPU cores) Locale: LANG=en_GB.UTF-8, LC_CTYPE=en_GB.UTF-8 (charmap=UTF-8) Shell: /bin/sh linked to /bin/dash Init: systemd (via /run/systemd/system)