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"
David and Daniel, many thanks for your suggestions! I was not aware of the --use-standard-socket option. I think this will do it for me. Linking the new socket to the old one is also a nice way I didn't think of and maybe it will be useful someday. Marco -- OpenPGP Key ID: 0x62937F7F
signature.asc
Description: OpenPGP digital signature
_______________________________________________ Gnupg-users mailing list Gnupg-users@gnupg.org http://lists.gnupg.org/mailman/listinfo/gnupg-users