Mailing List Archive

use text pinentry in the console
Hello,

when I type a gpg command in the terminal, such as:

gpg -c foo

the GUI pinentry dialog pops up to ask for password (I guess its
pinentry-gtk-2)

How can I confugure so that the ncurses (text based) dialog is used
instead ?

I am using gpg 2.2.12 on Debian 10

thank you

_______________________________________________
Gnupg-users mailing list
Gnupg-users@gnupg.org
https://lists.gnupg.org/mailman/listinfo/gnupg-users
Re: use text pinentry in the console [ In reply to ]
El día martes, febrero 22, 2022 a las 05:28:00p. m. +0100, Fourhundred Thecat via Gnupg-users escribió:

> Hello,
>
> when I type a gpg command in the terminal, such as:
>
> gpg -c foo
>
> the GUI pinentry dialog pops up to ask for password (I guess its
> pinentry-gtk-2)
>
> How can I confugure so that the ncurses (text based) dialog is used
> instead ?
>
> I am using gpg 2.2.12 on Debian 10

Run

# ls -l /usr/bin/pinent*

and set the sym-link to your needs.

matthias

--
Matthias Apitz, ? guru@unixarea.de, http://www.unixarea.de/ +49-176-38902045
Public GnuPG key: http://www.unixarea.de/key.pub

Peace instead of NATO! ??? ?????? ????! Frieden statt NATO! ¡Paz en vez de OTAN!

_______________________________________________
Gnupg-users mailing list
Gnupg-users@gnupg.org
https://lists.gnupg.org/mailman/listinfo/gnupg-users
Re: use text pinentry in the console [ In reply to ]
It's not ncurses, but you can use 'gpg --pinentry-mode loopback' to get the text mode.

_______________________________________________
Gnupg-users mailing list
Gnupg-users@gnupg.org
https://lists.gnupg.org/mailman/listinfo/gnupg-users
Re: use text pinentry in the console [ In reply to ]
On 2/22/2022 5:28 PM, Fourhundred Thecat via Gnupg-users wrote:
> Hello,
>
> when I type a gpg command in the terminal, such as:
>
>   gpg -c foo
>
> the GUI pinentry dialog pops up to ask for password (I guess its
> pinentry-gtk-2)
>
> How can I confugure so that the ncurses (text based) dialog is used
> instead ?
>
> I am using gpg 2.2.12 on Debian 10
>

On Debian you need to use:

$ update-alternatives --config pinentry

--
John Doe

_______________________________________________
Gnupg-users mailing list
Gnupg-users@gnupg.org
https://lists.gnupg.org/mailman/listinfo/gnupg-users
Re: use text pinentry in the console [ In reply to ]
> On 2022-02-22 18:57, john doe via Gnupg-users wrote:
> On 2/22/2022 5:28 PM, Fourhundred Thecat via Gnupg-users wrote:
>>
>> How can I confugure so that the ncurses (text based) dialog is used
>> instead ?
>>
>> I am using gpg 2.2.12 on Debian 10
>
> On Debian you need to use:
>
> $ update-alternatives --config pinentry

thank you, but changing this globally unfortunately causes problem with
thunderbird/enigmail. I get this error when trying to open encrypted mail:

Your GnuPG installation is configured to use the console for pinentry.
However, when using Enigmail you need a graphical version of pinentry.

This is a system setup or configuration error that prevents Enigmail
from working properly and cannot be fixed automatically.

What I would like to achieve is, that only when I call gog from the
commandline, (gpg -c foo.txt) is the text-based pinentry called

thank you



_______________________________________________
Gnupg-users mailing list
Gnupg-users@gnupg.org
https://lists.gnupg.org/mailman/listinfo/gnupg-users
Re: use text pinentry in the console [ In reply to ]
> On 2022-02-23 07:05, Fourhundred Thecat via Gnupg-users wrote:
> > On 2022-02-22 18:57, john doe via Gnupg-users wrote:
>> On 2/22/2022 5:28 PM, Fourhundred Thecat via Gnupg-users wrote:
>>
>> $ update-alternatives --config pinentry
>
> What I would like to achieve is, that only when I call gog from the
> commandline, (gpg -c foo.txt) is the text-based pinentry called

also, I tried adding an alias:

gpg='gpg --pinentry-mode loopback'

but then, I have another problem. When I use

gpg -c foo.txt

it only asks for password once, not twice. I would like to be asked
twice, to make sure the password is correct


_______________________________________________
Gnupg-users mailing list
Gnupg-users@gnupg.org
https://lists.gnupg.org/mailman/listinfo/gnupg-users
Re: use text pinentry in the console [ In reply to ]
> On 2022-02-23 08:40, jman wrote:
>
> I think you can set that with an env var in your ~/.bashrc:
> export PINENTRY_USER_DATA=ncurses
>
> and the pinentry chooser will be `/usr/bin/pinentry-ncurses`.
>
> As a further option, I use the basic `tty` pinentry chooser and I set
> this in my ~/.bashrc:
> export PINENTRY_USER_DATA=tty

thank you, but exporting PINENTRY_USER_DATA=ncurses or
PINENTRY_USER_DATA=tty has no effect

I still get the popup gtk pinenetry dialog..

_______________________________________________
Gnupg-users mailing list
Gnupg-users@gnupg.org
https://lists.gnupg.org/mailman/listinfo/gnupg-users
Re: use text pinentry in the console [ In reply to ]
Am Di den 22. Feb 2022 um 17:28 schrieb Fourhundred Thecat via Gnupg-users:
> the GUI pinentry dialog pops up to ask for password (I guess its
> pinentry-gtk-2)
>
> How can I confugure so that the ncurses (text based) dialog is used
> instead ?

You should be able to call it this way:
env -u DISPLAY gpg -c foo

Regards
Klaus
--
Klaus Ethgen http://www.ethgen.ch/
pub 4096R/4E20AF1C 2011-05-16 Klaus Ethgen <Klaus@Ethgen.ch>
Fingerprint: 85D4 CA42 952C 949B 1753 62B3 79D0 B06F 4E20 AF1C
Re: use text pinentry in the console [ In reply to ]
> On 2022-02-23 11:40, Klaus Ethgen wrote:
> Am Di den 22. Feb 2022 um 17:28 schrieb Fourhundred Thecat via Gnupg-users:
>>
>> How can I confugure so that the ncurses (text based) dialog is used
>> instead ?
>
> You should be able to call it this way:
> env -u DISPLAY gpg -c foo

that works!

thank you


_______________________________________________
Gnupg-users mailing list
Gnupg-users@gnupg.org
https://lists.gnupg.org/mailman/listinfo/gnupg-users