http://qa.mandrakesoft.com/show_bug.cgi?id=2493





------- Additional Comments From [EMAIL PROTECTED]  2003-04-09 18:47 -------
I think this is a really good idea. I actually implemented this myself on my 
systems before seeing this bug--it would be great to have it integrated into 
Mandrake. 
 
BTW, an IMHO slightly better way to have the gpgagent startup script work is 
the following (that I stole from somewhere off the web and modified a little): 
 
if test -f $HOME/.gpg-agent-info && kill -0 `cut -d: -f 2 
$HOME/.gpg-agent-info` 2>/dev/null; then 
    GPG_AGENT_INFO=`cat $HOME/.gpg-agent-info` 
    export GPG_AGENT_INFO 
else 
    eval `/usr/bin/gpg-agent --daemon` 
    echo $GPG_AGENT_INFO >$HOME/.gpg-agent-info 
fi 
 
The advantage of this is: 
 
  1) If an existing gpg-agent is already running, it doesn't kill it. (kill -0 
just tests) 
  2) Since we store info in $HOME/.gpg-agent-info, if for some [bizarre] 
reason the user is running an unrelated process called "gpg-agent", we neither 
kill it (which is intrusive and wrong) nor are we confused into thinking it's 
the gpg-agent we are looking for. This is the same reason that initscripts 
save pids and don't just do killalls. 
 
Again, as Pascal pointed out, this script has to be included in the context of 
the Xsession--it **will not** work to put a script in xinit.d -- this actually 
seems to me to be a gpg-agent bug, actually, as it should be able to support 
the same semantics as ssh-agent... but that's another bugzilla bug for another 
day. =) 

-- 
Configure bugmail: http://qa.mandrakesoft.com/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are on the CC list for the bug, or are watching someone who is.


------- Reminder: -------
assigned_to: [EMAIL PROTECTED]
status: NEW
creation_date: 
description: 
It would be great if gpg-agent could be automatically started at X start when people 
use kmail AEGYTEN crypto plugins. 
 
The attached patch and script I currently use could make it. 
 
The patch ensure that if the script is installed it is run in the current shell 
context 
(this is very important to get the GPG_AGENT_INFO env variable available on the 
desktop) 
 
The script kills all previous gpg-agent process for the user login in and starts a new 
one, exporting the correct env variable.

Reply via email to