[PATCH] Remove the environment file when quitting.

Werner Koch wk at gnupg.org
Mon Sep 26 14:32:28 CEST 2011


Hi,

instead of using the environment file it is suggested to make use of a
feature introduced with 2.0.16:

 * If the agent's --use-standard-socket option is active, all tools
   try to start and daemonize the agent on the fly.  In the past this
   was only supported on W32; on non-W32 systems the new configure
   option --enable-standard-socket may now be used to use this feature
   by default.

Except for some kins of remotely mounted home directories this is a far
better system than what we did in the past.  What's left to do is

if [ "$PS1" ]; then
    unset GPG_AGENT_INFO
    unset SSH_AGENT_PID
    export SSH_AUTH_SOCK="${HOME}/.gnupg/S.gpg-agent.ssh"
fi

in .bashrc.  The first unset is to get rid of any setting of that envvar
and the ssh stuff is required because ssh does not know about the
on-demand agent starting.  Before you may use the gpg-agent for ssh you
need to use gpg or gpgsm at least once or run "gpg-connect-agent /bye"
once.


Shalom-Salam,

   Werner

-- 
Die Gedanken sind frei.  Ausnahmen regelt ein Bundesgesetz.




More information about the Gnupg-devel mailing list