Description of problem:
When pinentry is run from a console, spurious error messages are displayed. The pinentry dialog works as expected.
When pinentry is invoked indirectly by the gpg command, the messages are also displayed, but no pinentry dialog is displayed. This makes the gpg command unusable on a console in its simplest form:
gpg -d < x.asc
This occurs after a fresh install of F13.
Version-Release number of selected component (if applicable):
Steps to Reproduce:
1. Switch to a console (e.g. ctrl-alt-f2)
2. Type "pinentry"
3. Type "getpin"
pinentry-gtk2: no LC_CTYPE known - assuming UTF-8
is displayed three times.
The curses pinentry dialog is also displayed
and works as expected.
No error messages are displayed.
Also occurs with "pinentry-curses"
Adding a dummy argument for the lc-ctype suppresses the error messages:
pinentry --lc-ctype asdf
LC_CTYPE is set in the console:
$ locale | grep LC_CTYPE
(In reply to comment #0)
> Description of problem:
> When pinentry is run from a console, spurious error messages are displayed. The
> pinentry dialog works as expected.
> When pinentry is invoked indirectly by the gpg command, the messages are also
> displayed, but no pinentry dialog is displayed. This makes the gpg command
> unusable on a console in its simplest form:
> gpg -d < x.asc
Simple workaround for now:
gpg -d x.asc
This seemed to work for me
(In reply to comment #1)
> Simple workaround for now:
> gpg -d x.asc
> This seemed to work for me
Thanks. That works fine.
Alternatively you can do "export GPG_TTY=`tty`" before using gpg.
I suspect the original problem ("can't use gpg -d < x.asc on terminal") cannot be resolved in either pinentry or gnupg2, since there is no way for a Unix process to tell the current terminal device if stdin is not a tty.
(actually gpg could check stdout/stderr if stdin is not a tty. But in that case, "gpg -d < x.asc 2> /dev/null 1> y.txt" won't work)
Can we close this as notabug or wontfix?
(In reply to comment #3)
> Alternatively you can do "export GPG_TTY=`tty`" before using gpg.
Thanks. That works fine.
I can't find "GPG_TTY" in the gpg man page.
Is that a gpg documentation bug?
It is documented in the info manual (try "info gnupg2" and "s GPG_TTY"):
You should always add the following lines to your `.bashrc' or whatever
initialization file is used for all shell invocations:
This message is a reminder that Fedora 13 is nearing its end of life.
Approximately 30 (thirty) days from now Fedora will stop maintaining
and issuing updates for Fedora 13. It is Fedora's policy to close all
bug reports from releases that are no longer maintained. At that time
this bug will be closed as WONTFIX if it remains open with a Fedora
'version' of '13'.
Package Maintainer: If you wish for this bug to remain open because you
plan to fix it in a currently maintained version, simply change the 'version'
to a later Fedora version prior to Fedora 13's end of life.
Bug Reporter: Thank you for reporting this issue and we are sorry that
we may not be able to fix it before Fedora 13 is end of life. If you
would still like to see this bug fixed and are able to reproduce it
against a later version of Fedora please change the 'version' of this
bug to the applicable version. If you are unable to change the version,
please add a comment here and someone will do it for you.
Although we aim to fix as many bugs as possible during every release's
lifetime, sometimes those efforts are overtaken by events. Often a
more recent Fedora release includes newer upstream software that fixes
bugs or makes them obsolete.
The process we are following is described here:
Fedora 13 changed to end-of-life (EOL) status on 2011-06-25. Fedora 13 is
no longer maintained, which means that it will not receive any further
security or bug fix updates. As a result we are closing this bug.
If you can reproduce this bug against a currently maintained version of
Fedora please feel free to reopen this bug against that version.
Thank you for reporting this bug and we are sorry it could not be fixed.