On 2009-10-29 14:59, lis...@nebelschwaden.de wrote: > When using linux, even when I start gpg-agent --daemon, it creates it's > socket under /tmp/<cryptdir>, while gpg searches for .gnupg/S.gpg-agent. > The environment the daemon exports seems to be ignored. > > So I have to manually link .gnupg/S.gpg-agent to theat file below /tmp to > be able to work with a smartcard at all. > > # gpg-agent --daemon > GPG_AGENT_INFO=/tmp/gpg-mS2h6N/S.gpg-agent:1510:1; export GPG_AGENT_INFO; > > # gpg2 --card-status > can't connect to `/root/.gnupg/S.gpg-agent': No such file or directory
Because it doesn't export anything. A program cannot modify the environment of its parent, so gpg-agent has to be executed like this: » eval $(gpg-aget --daemon) » echo $GPG_AGENT_INFO /tmp/gpg-dbASrL/S.gpg-agent:1762:1 The 'eval $(foo)' part is tells your shell (bash, zsh) to interpret gpg-agent's output as commands; without it, all gpg-agent can do is print them to stdout. -- Mantas Mikulėnas <graw...@gmail.com> / PGP 0xCA07F3A91C9F7C03 ASCII ribbon campaign - stop HTML mail _______________________________________________ Gnupg-users mailing list Gnupg-users@gnupg.org http://lists.gnupg.org/mailman/listinfo/gnupg-users