Restarting gnupg-agent inside X session
david at systemoverlord.com
Tue Mar 1 02:41:04 CET 2011
On 02/28/2011 08:20 PM, Daniel Kahn Gillmor wrote:
> On 02/28/2011 06:49 PM, David Tomaschik wrote:
>> Each process has its own copy of the environment inherited from its
>> parent, so it's not possible to change the GPG_AGENT_INFO variable for
>> all processes. You could start gpg-agent with --use-standard-socket,
>> and programs should fall back to that.
> Alternately, since you probably already know the current setting of
> GPG_AGENT_INFO, you could just start the agent and link its new socket
> to the place where the old one used to be. Something like (untested):
> old_socket=$(printf "%s" "$GPG_AGENT_INFO" | sed 's/:.*$//')
> mkdir -m 0700 -p $(dirname "$old_socket")
> eval $(gpg-agent --daemon)
> new_socket=$(printf "$s" "$GPG_AGENT_INFO" | sed 's/:.*$//')
> ln "$new_socket" "$old_socket"
Other than on systems where $HOME is on a filesystem that does not
support sockets (e.g., NFS/CIFS/etc.), is anyone aware of an issue with
the use of --use-standard-socket? Seems like it would make restarting
GPG an easier task.
More information about the Gnupg-users