tag:gpgtools.tenderapp.com,2011-11-04:/discussions/problems/50502-how-to-avoid-pinentry-pop-up-window-when-using-terminalGPGTools: Discussion 2016-12-01T13:23:55Ztag:gpgtools.tenderapp.com,2011-11-04:Comment/411658702016-11-06T14:52:25Z2016-11-06T14:52:25Zhow to avoid Pinentry pop-up window when using terminal<div><p><strong>Which of our tools is giving you problems?</strong>
MacGPG2 and GPGServices as it was the only way to install GPG2 in
my mac.</p>
<p><strong>Paste version-info of all components (how to: <a href="https://gpgtools.tenderapp.com/kb/faq/where-can-i-find-version-info-of-the-installed-tools">
https://gpgtools.tenderapp.com/kb/faq/where-can-i-find-version-info...</a>):</strong>
Please, see attached file for version.</p>
<p><strong>Describe your problem. Add as much detail as
possible.</strong> I normally use gpg from terminal. Now, every
time I encrypt something a Pinentry window will pop up asking for
my passphrase.<br>
Is there a way to avoid this and work only in terminal?</p>
<p><strong>What did you expect instead</strong> Type passphrase in
terminal window</p>
<p><strong>Describe steps leading to the problem.</strong> Just
using terminal as usual</p>
<p><strong>Are you using any other Mail.app plugins?</strong>
No</p></div>da_gartag:gpgtools.tenderapp.com,2011-11-04:Comment/411658702016-11-18T19:57:57Z2016-11-18T19:57:57Zhow to avoid Pinentry pop-up window when using terminal<div><p>Hi,</p>
<p>if you add the following commands to your .bashrc file, you
should be able to enter your passphrase in Terminal:</p>
<p>export GPG_TTY=$(tty) export
PINENTRY_USER_DATA="USE_CURSES=1"</p>
<p>Hope that helps.</p></div>Luke Letag:gpgtools.tenderapp.com,2011-11-04:Comment/411658702016-11-21T13:10:52Z2016-11-21T13:10:52Zhow to avoid Pinentry pop-up window when using terminal<div><p>Hi Luke</p>
<p>Thanks for the answer.<br>
It helped in a funny way, it feels like moving pinentry to
terminal.</p>
<p>May I ask what these commands do. How to revert eventually to
default Pinentry?</p></div>da_gartag:gpgtools.tenderapp.com,2011-11-04:Comment/411658702016-12-01T09:15:34Z2016-12-01T09:15:34Zhow to avoid Pinentry pop-up window when using terminal<div><p>Hi,</p>
<p>the commands sets 2 environment variables in the bash:<br>
PINENTRY_USER_DATA is passed to pinentry and it to show in the
Terminal (USE_CURSES=1).<br>
GPG_TTY tells gpg2 which Terminal to use, to show pinentry. $(tty)
means the current Terminal.</p>
<p>To get the default pinentry you can remove the commands from
your .bashrc (permanently).<br>
Or run the command "export PINENTRY_USER_DATA=''" (only the current
seission).</p>
<p>Regards, Mento</p></div>Mentotag:gpgtools.tenderapp.com,2011-11-04:Comment/411658702016-12-01T09:31:49Z2016-12-01T09:31:49Zhow to avoid Pinentry pop-up window when using terminal<div><p>Thank for the answer.</p></div>da_gar