When used with
gpg-agent, GnuPG uses a "pinentry" utility to query for the passphrase. There are different pinentry options; it seems you're using one of the graphical ones.
As an alternative, I'd propose you try out the two command line based pinentry options, one using curses, the other one plain comman line queries:
$ apt-cache search 'pinentry-(curses|tty)'
pinentry-curses - curses-based PIN or pass-phrase entry dialog for GnuPG
pinentry-tty - minimal dumb-terminal PIN or pass-phrase entry for GnuPG
They should also be available for non-Debian based distributions und similar names. After installing them, also configure
gpg-agent to use them (from
Please make sure that a proper
pinentry program has been installed under the default filename (which is system dependent) or use the option
pinentry-program to specify the full name of that program. It is often useful to install a symbolic link from the actual used
/usr/bin/pinentry-gtk) to the expected one (e.g.
If you prefer the configuration file option, edit