Re: thunderbird needs graphical pinentry to use external gnupg for encrypting emails
| Newsgroups | gmane.linux.lfs.beyond.devel |
|---|---|
| Message-ID | <[email protected]> |
On 11/19/24 22:59, Xi Ruoyao ([email protected] via blfs-dev Mailing List) wrote: >> I do really sign my BLFS commits with GPG but your (and my) posts to >> blfs-dev are not signed. So I can logically consider the git use case >> more important here (while IMO both Git page and Thunderbird page are a >> wrong location). > > I've fixed Git with: > > commit 7c9e274a7ac1a97315bce625af2be40ef7afb1c3 > Author: Xi Ruoyao <[email protected]> > Date: Wed Nov 20 12:57:16 2024 +0800 > > profile: Set GPG_TTY for GnuPG > > diff --git a/postlfs/config/profile.xml b/postlfs/config/profile.xml > index 935d9308f9..0c6b058323 100644 > --- a/postlfs/config/profile.xml > +++ b/postlfs/config/profile.xml > @@ -175,6 +175,10 @@ export XDG_DATA_DIRS=${XDG_DATA_DIRS:-/usr/share} > export XDG_CONFIG_DIRS=${XDG_CONFIG_DIRS:-/etc/xdg} > export XDG_RUNTIME_DIR=${XDG_RUNTIME_DIR:-/tmp/xdg-$USER} > > +# GnuPG wants this or it'll fail with pinentry-curses under some > +# circumstances (for example signing a Git commit) > +tty -s && export GPG_TTY=$(tty) > + > # Set up a red prompt for root and a green one for users. > NORMAL="\[\e[0m\]" > RED="\[\e[1;31m\]" > > But obviously it doesn't help GUI apps. I'm not sure this is good for /etc/profile when using a terminal emulator in a graphical desktop environment. I use konsole with multiple instances and tabs. When creating a new instance or a new tab, /etc/profile is not sourced, only $HOME/.bashrc. I checked two tabs and got: /dev/pts/4 /dev/pts/13 And in a different instance: /dev/pts/5 Perhaps there needs to be an alias like alias git='GPG_TTY=$(tty) git' Not tested. -- Bruce -- http://lists.linuxfromscratch.org/sympa/info/blfs-dev Unsubscribe: See the above information page