On Wed, Mar 17, 2010 at 09:23:40AM -0400, Anton Aylward wrote:
Petr Uzel said the following on 03/17/2010 05:49 AM:
[...]
Things broke. The login hung. I was no longer getting the prompt to the screen. [...]
I can reproduce that, as well as other people: https://bugs.g10code.com/gnupg/issue1199 http://bugs.gentoo.org/203871
I don't know why it does not work, but I'll look into it.
The first URL not only describes the bug but the coe in the shell script for keychain says:
# save LC_ALL so that pinentry-curses works right. This has always worked # correctly for me but peper and kloeri had problems with it.
Yes its the pinenetry called by gpg which is the problem.
pinentry is not called directly by gpg, but by gpg-agent.
The code for gpg calls /usr/bin/pinentry which is a shell script.
Yes, that's how it works in suse.
I *think* it should call pinentry-curses or the
I removed pinentry-gtk-2 with no effect
You can override the default pinentry by setting pinentry-program /usr/bin/pinentry-curses in ~/.gnupg/gpg-agent.conf However, setting that to pinentry-curses does not seem to help.
Running 'sh -x /usr/bin/pinentry' from the tty it detects that there is a running KDE eslwhere and tries to execute /usr/bin/pinentry-qt4
That chain of if/elseif is a but confusing and unclear.
True, but do you know any other way how gpg-agent could determine which pinentry to run?
If -tq is installed then it will be use REGARDLESS of whether KDE is running or not. As a result -curses can never be selected.
Graphical pinentry's have precedence over pinentry-curses. If DISPLAY is not set, then pinentry-{qt,gtk-2} runs pinentry-curses instead. If you don't like this behavior, you can modify gpg-agent.conf as mentioned above. The problem seems to be that keychain runs gpg with empty environment and gpg-agent (for some reason) can not handle it. As a workaround, you can apply this patch to /usr/bin/keychain: @@ -1039,7 +1039,7 @@ for glm_k in "$@"; do # Check if this key is known to the agent. Don't know another way... - if echo | env -i PATH="$PATH" GPG_AGENT_INFO="$GPG_AGENT_INFO" \ + if echo | env PATH="$PATH" GPG_AGENT_INFO="$GPG_AGENT_INFO" \ gpg --no-options --use-agent --no-tty --sign --local-user "$glm_k" -o- >/dev/null 2>&1; then # already know about this key mesg "Known gpg key: ${BLUE}${glm_k}${OFF}" Please note that this may have some nasty effects, so please use at your own risk (if you decide to give it a try, please let me know if that resolves the issue for you). I'll try to find better solution. Petr -- Petr Uzel, openSUSE Boosters Team IRC: ptr_uzl @ freenode