Re: [Cooker] kmail and gpg-agent auto start

2003-02-06 Thread Pascal Cavy
Le Jeudi 6 Février 2003 13:49, Guillaume Rousse a écrit :
> Le Jeudi 6 Février 2003 13:23, Pascal Cavy a écrit :
> > 1. I wonder if this is the right place to call the script
> > (would it work if one uses startx instead of desktop login ?)
>
> flepied suggested to use a specific script in /etc/X11/xinit.d/  instead,
> see http://www.mail-archive.com/cooker@linux-mandrake.com/msg80761.html

won't work because executables in xinit.d are called in a child shell, so the 
exported variable GPG_AGENT_INFO is no more available upon return
my script has to be called in the same env of the caller ie:
  . (dot space) /etc/X11/xinit/gpgagent

>
> > 2. when ok, could it be added to xinitrc RPM ?
>
> better in the package providing gpg-agent

hummm the adaptation on ssh-agent is in xinitrc RPM IIRC... ?
-- 
Pascal Cavy - VMF
__
Running 6 days, 20:35,  8 users,  load average: 0.16, 0.11, 0.14
(gcc version 3.2.1 (Mandrake Linux 9.1 3.2.1-4mdk))
Kernel Linux version 2.4.21pre4-1mdkenterprise





Re: [Cooker] kmail and gpg-agent auto start

2003-02-06 Thread Guillaume Rousse
Le Jeudi 6 Février 2003 13:23, Pascal Cavy a écrit :
> 1. I wonder if this is the right place to call the script
> (would it work if one uses startx instead of desktop login ?)
flepied suggested to use a specific script in /etc/X11/xinit.d/  instead, see 
http://www.mail-archive.com/cooker@linux-mandrake.com/msg80761.html

> 2. when ok, could it be added to xinitrc RPM ?
better in the package providing gpg-agent
-- 
Disks are always full. It is futile to try to get more disk space. Data 
expands to fill any void. 
-- Murphy's Computer Laws n°4





[Cooker] kmail and gpg-agent auto start

2003-02-06 Thread Pascal Cavy
Helped and Inspired by Martin Fahrendorf
I have written the following file :

cat /etc/X11/xinit/gpgagent
#!/bin/sh
#
# Start GPG Agent, if some are already running, stop them before
# courtesy of Martin Fahrendorf <[EMAIL PROTECTED]>  (Helix GmbH)
# adapted by Pascal Cavy (VMF)
#
ps ux | grep gpg-agent | grep -v grep | awk '{print $2}' | while read pid
do
kill $pid
done
agent=`which gpg-agent 2> /dev/null`
[ -x "$agent" ] && eval $($agent --daemon)

This will autostart the gpg-agent daemon for kmail crytplug extensions at kde 
startup (through desktop login, I did not test through startx)

I have placed the call into /etc/X11/Xsession
Here is the diff:
--- /etc/X11/Xsession.2_4_4_69mdk   2003-02-05 18:37:05.0 +0100
+++ /etc/X11/Xsession   2003-02-06 13:05:16.0 +0100
@@ -64,6 +64,10 @@
 /etc/X11/xinit/fixkeyboard
 fi

+if [ -x /etc/X11/xinit/gpgagent ]; then
+. /etc/X11/xinit/gpgagent
+fi
+
 if [ -z "$BROWSER" ] ; then
# we need to find a browser on this system
BROWSER=`which mozilla 2> /dev/null`

1. I wonder if this is the right place to call the script
(would it work if one uses startx instead of desktop login ?)

2. when ok, could it be added to xinitrc RPM ?


-- 
Pascal Cavy - VMF
__
Running 6 days, 19:22,  8 users,  load average: 0.01, 0.15, 0.23
(gcc version 3.2.1 (Mandrake Linux 9.1 3.2.1-4mdk))
Kernel Linux version 2.4.21pre4-1mdkenterprise