[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: Terminal pinentry in termux
From: |
Kridsada Thanabulpong |
Subject: |
Re: Terminal pinentry in termux |
Date: |
Thu, 31 Jan 2019 20:45:36 +0700 |
Hi,
AFAIK, gpg-agent will use the INSIDE_EMACS environment variable to detect
whether GnuPG is being called inside Emacs then forward pinentry to the
Emacs pinentry socket (usually /tmp/emacs<uid>/pinentry) if exists.
My first guess would be something is causing $INSIDE_EMACS to not being
set properly under Termux. You could try to run, inside scratch buffer:
(getenv "INSIDE_EMACS")
...to see if it was set. If it wasn't, I'm not sure how the variable
was set normally, but in my .emacs I have this line:
(setenv "INSIDE_EMACS" emacs-version)
To ensure it's present no matter how I run Emacs. If it was already set
then maybe try to inspect if pinentry socket exists at
/tmp/emacs<uid>/pinentry.
Also, if you happen to run gpg-agent as ssh-agent, you'd need to have:
(shell-command "gpg-connect-agent updatestartuptty /bye" "*gpg-update-tty*")
Line somewhere in your .emacs (but INSIDE_EMACS must also already be set).
There's no way for gpg-agent to know which tty to use via the ssh-agent
protocol, but the command also happens to call the function that updates
agent to forward pinentry to Emacs.
Regards,
Kridsada
CB <caladanbrood17@yandex.ru> writes:
> Hello,
>
> I'd like to ask how to configure terminal minibuffer pinentry in emacs?
> On my laptop, where I run GUI Emacs it works perfectly. But on my
> tablet, where I have it run in termux it tries to use the gnupg (curses
> I guess) pinentry instead of the minibuffer. How could I copy the GUI
> behavior on termux?
>
> Thank you and kind regards,
>
> CB