Le Lundi 21 Mars 2005 18:17, Frans Pop a ÃcritÂ:
> On Monday 21 March 2005 17:45, Andrà WÃbbeking wrote:
> > Have a look in /usr/bin/startkde and search for env.
>
> What's the best way to stop gpg-agent on logout from KDE?
>
> In /usr/bin/startkde I see a reference to shutdown scripts, so I
> guess a script in ~/.kde/shutdown should work (I currently start
> gpg-agent from a script in ~/.kde/env).
>
> But what should be in that script?
> For ssh "ssh-agent -k" is suggested, but AFAICT no "-k" option is
> available for gpg-agent.

kill ${${GPG_AGENT_INFO#*:}%:*}

works only under zsh though, but I don't understand why. maybe because 
double expansion is not POSIX ?

another way is :

kill `echo $GPG_AGENT_INFO | sed -e 's/^[^:]*:\(.*\):.*$/\1/'`


-- 
ÂOÂ  Pierre Habouzit
ÂÂO
OOO                                                http://www.madism.org

Attachment: pgpQju4Vf5y6g.pgp
Description: PGP signature

Reply via email to