> On Tue, 25 Aug 2015, Thorsten Glaser wrote:
> 
> > particular sharing now becomes impossible).
> 
> It’s actually worse: when using startx or no X environment
> at all, I can no longer use gpg-agent:
> 
> tglase@tglase-nb:~ $ eval $(gpg-agent --daemon --sh)
> tglase@tglase-nb:~ $ gpg --clearsign <<<x
...
> gpg: gpg-agent is not available in this session

This seems to work for gpg1 and gpg2:
        : "${GPG_AGENT_INFO=${GNUPGHOME-$HOME/.gnupg}/S.gpg-agent:0:1}"
        export GPG_AGENT_INFO

(It also makes mutt happy--if there's no GPG_AGENT_INFO, it will prompt
for a passphrase itself; GPG_AGENT_INFO='' is OK for mutt, too.)

Since there's a known location, you should be able to share across
sessions.

Trying to support gpg2.0 and 2.1 in one startup script is still annoying
for various reasons; e.g., 2.0 needs --use-standard-socket to get this
behaviour, but 2.1 will complain loudly about it.  And 2.1's automatic
agent spawning makes it look like things are working as expected, until
problems like this appear.

-- Michael

Attachment: signature.asc
Description: Digital signature

Reply via email to