From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Tassilo Horn Newsgroups: gmane.emacs.help Subject: Re: Pinentry in emacs without X doesn't work reliably Date: Fri, 08 Jul 2016 19:53:35 +0200 Message-ID: <8760sg2ezk.fsf@gnu.org> References: <87y45cum6v.fsf@127.0.0.1> NNTP-Posting-Host: plane.gmane.org Mime-Version: 1.0 Content-Type: text/plain X-Trace: ger.gmane.org 1468001685 12853 80.91.229.3 (8 Jul 2016 18:14:45 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Fri, 8 Jul 2016 18:14:45 +0000 (UTC) Cc: help-gnu-emacs@gnu.org, Daiki Ueno To: HASM Original-X-From: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Fri Jul 08 20:14:33 2016 Return-path: Envelope-to: geh-help-gnu-emacs@m.gmane.org Original-Received: from lists.gnu.org ([208.118.235.17]) by plane.gmane.org with esmtp (Exim 4.69) (envelope-from ) id 1bLaIJ-000789-I8 for geh-help-gnu-emacs@m.gmane.org; Fri, 08 Jul 2016 20:14:32 +0200 Original-Received: from localhost ([::1]:47246 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1bLaIF-0002VZ-Cb for geh-help-gnu-emacs@m.gmane.org; Fri, 08 Jul 2016 14:14:27 -0400 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:45012) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1bLZyF-0004h6-30 for help-gnu-emacs@gnu.org; Fri, 08 Jul 2016 13:53:49 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1bLZyB-0005Me-Uq for help-gnu-emacs@gnu.org; Fri, 08 Jul 2016 13:53:47 -0400 Original-Received: from out1-smtp.messagingengine.com ([66.111.4.25]:57919) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1bLZyA-0005M7-LT for help-gnu-emacs@gnu.org; Fri, 08 Jul 2016 13:53:43 -0400 Original-Received: from compute7.internal (compute7.nyi.internal [10.202.2.47]) by mailout.nyi.internal (Postfix) with ESMTP id 096EF202EC; Fri, 8 Jul 2016 13:53:39 -0400 (EDT) Original-Received: from frontend1 ([10.202.2.160]) by compute7.internal (MEProxy); Fri, 08 Jul 2016 13:53:39 -0400 DKIM-Signature: v=1; a=rsa-sha1; c=relaxed/relaxed; d= messagingengine.com; h=cc:content-type:date:from:message-id :mime-version:references:subject:to:x-sasl-enc:x-sasl-enc; s= smtpout; bh=oAHKwmlF6BjOPNOENd6w8p3NxkY=; b=YHVsqnP/P2BnvF85i5yn YrOhhkRiyFNQ2oQGds/pAV6nWOXAMAZnOg+vNfqGUspv6/ciDQmMlmyM0qI/9PSr 99A/khA3q01TTI0B3S24T8QExfmwGnlRghu2GK0/B7AkFZJQbn3C+RPrkYQQxzsN k0lfivE9CRBDAUahvfRC7DI= X-Sasl-enc: ExjbwSKZKI/GVjamEZvja769fqZvA18j7SuUAYiNcYoC 1468000418 Original-Received: from thinkpad-t440p (unknown [2.162.95.190]) by mail.messagingengine.com (Postfix) with ESMTPA id 2CAB7F29F3; Fri, 8 Jul 2016 13:53:37 -0400 (EDT) Mail-Followup-To: HASM , help-gnu-emacs@gnu.org, Daiki Ueno User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/25.1.50 (gnu/linux) X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] X-Received-From: 66.111.4.25 X-BeenThere: help-gnu-emacs@gnu.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: Users list for the GNU Emacs text editor List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Original-Sender: "help-gnu-emacs" Xref: news.gmane.org gmane.emacs.help:110738 Archived-At: HASM writes: Hi HASM, >> Now the problem is, that my keyboard input doesn't seem to get thru >> to that pinentry dialog reliably. > > Did you install gnugp-1 on your system? Nope, but that should work with GnuPG-2, too. > Did you have or create this file > ~/.gnupg/gpg-agent.conf > and have/add these lines into it: > allow-emacs-pinentry > pinentry-program /usr/bin/pinentry-emacs > (replace the path above to where your pinentry-emacs is)? Ah, cool. That and installing the pinentry ELPA package made the thing work! Now my ~/.gnupg/gpg-agent.conf on the server is --8<---------------cut here---------------start------------->8--- daemon allow-emacs-pinentry enable-ssh-support max-cache-ttl 14400 max-cache-ttl-ssh 14400 default-cache-ttl 7200 default-cache-ttl-ssh 14400 pinentry-program /usr/bin/pinentry-emacs --8<---------------cut here---------------end--------------->8--- > Did you add these lines to your emacs initialization: > (load "pinentry") > (pinentry-start) > (setq epg-gpg-program "gpg") > (or use customize instead of the last line)? Since I installed it via ELPA, I can just call (pinentry-start) without loading before. And `epg-gpg-program' is "gpg2" here. But I wonder if pinentry-program /usr/bin/pinentry-emacs is the right thing to do. What if some other program needs a pinentry? The pinentry ELPA package description doesn't say I need that line. https://elpa.gnu.org/packages/pinentry.html However, when I remove that line, I get an error that there's no pinentry program. I hoped that allow-emacs-pinentry would somehow use pinentry-emacs if running inside emacs and some other pinentry program for non-emacs programs. Daiki, since you've made the thing, do you have a clue what else I might need? I'm running gnupg-2.1.13 and pinentry-0.9.7, so according to the pinentry ELPA package docs, those versions should be recent enough. Or maybe it's the other way round and pinentry-emacs spawns the right pinentry depending on if we're running inside emacs? Then that we need to also set the pinentry-program to pinentry-emacs should be documented. Bye, Tassilo