From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Eric S Fraga Newsgroups: gmane.emacs.help Subject: Re: EasyPG Assistant and emacs -nw Date: Wed, 09 Mar 2011 10:11:57 +0000 Organization: Aioe.org NNTP Server Message-ID: <87mxl4ob6a.fsf@ucl.ac.uk> References: <0d4ccc5b-73fc-4bcd-86fe-d5814ca603e8@p11g2000vbq.googlegroups.com> <87ipvtct1d.fsf@ucl.ac.uk> NNTP-Posting-Host: lo.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Trace: dough.gmane.org 1299667306 25418 80.91.229.12 (9 Mar 2011 10:41:46 GMT) X-Complaints-To: usenet@dough.gmane.org NNTP-Posting-Date: Wed, 9 Mar 2011 10:41:46 +0000 (UTC) To: help-gnu-emacs@gnu.org Original-X-From: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Wed Mar 09 11:41:42 2011 Return-path: Envelope-to: geh-help-gnu-emacs@m.gmane.org Original-Received: from lists.gnu.org ([199.232.76.165]) by lo.gmane.org with esmtp (Exim 4.69) (envelope-from ) id 1PxGpq-0001fH-56 for geh-help-gnu-emacs@m.gmane.org; Wed, 09 Mar 2011 11:41:42 +0100 Original-Received: from localhost ([127.0.0.1]:60392 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1PxGpo-0005tv-GT for geh-help-gnu-emacs@m.gmane.org; Wed, 09 Mar 2011 05:41:40 -0500 Original-Path: usenet.stanford.edu!news-transit.tcx.org.uk!aioe.org!.POSTED!not-for-mail Original-Newsgroups: gnu.emacs.help Original-Lines: 42 Original-NNTP-Posting-Host: yhdbQjUCqTeH8YIwZVE8kQ.user.speranza.aioe.org Original-X-Complaints-To: abuse@aioe.org User-Agent: Gnus/5.110014 (No Gnus v0.14) Emacs/24.0.50 (gnu/linux) X-Notice: Filtered by postfilter v. 0.8.2 X-Face: av6A"vZ{AypDB`d^.T35oG%$E*Qh]4F)K=*$-NHz5{7WZfAFQFB]F@gf}l9`XLs9(iD?D/! nafKE,S#G!4W/flj=9(U{]t'lP,,5~:s*~;kKR Cancel-Lock: sha1:zPIwJmSvZHM1MPG7vt7/71z0sOE= Original-Xref: usenet.stanford.edu gnu.emacs.help:185773 X-BeenThere: help-gnu-emacs@gnu.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Users list for the GNU Emacs text editor List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Original-Sender: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Errors-To: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.help:79924 Archived-At: Francis Moreau writes: > On Mar 8, 8:26 pm, Eric S Fraga wrote: [...] >> I agree with you.  The solution I use is to have the following in my >> emacs initialisation: >> >> --8<---------------cut here---------------start------------->8--- >> (require 'epa) >> (if (not window-system) >>     (setenv "GPG_AGENT_INFO" nil)) ;to avoid graphical pop-up when on tty >> --8<---------------cut here---------------end--------------->8--- >> >> this will cause emacs to use the mini-buffer for passphrase input so it >> solves one problems; unfortunately, it means that the passphrase is not >> cached (i.e. by gpg-agent) so you may have to type it repeatedly.  so >> it's not a complete solution... > > BTW, you could improve this a little perhaps by setting the pinentry > program to the gtk version (pinentry-gtk) if it's installed and if > it's not then disabling the use of gpg-agent with the environment > variable like you did. > > Thanks Thanks. I actually do have pinentry installed and I use it all the time. the problem arises when I connect to my desktop *remotely* using ssh without X (e.g. from a phone or somebody else's computer with putty, say): the agent is running and, if the passphrase has expired, the agent will prompt for the passphrase again using the pop-up dialog. Unfortunately, from my ssh connection, I cannot obviously see that dialog that has appeared on my desktop! Anyway, I have a solution that works although it is not elegant. Fixing it would require gpg-agent to be much smarter about who is asking for permission and under what conditions. Not impossible, I guess, but it's not necessarily emacs's fault. -- : Eric S Fraga (GnuPG: 0xC89193D8FFFCF67D) in Emacs 24.0.50.1 + No Gnus v0.14