Gentoo Archives: gentoo-user

From: Mick <michaelkintzios@×××××.com>
To: gentoo-user@l.g.o
Subject: Re: [gentoo-user] Starting up gpg-agent (and ssh-agent?)
Date: Fri, 28 May 2010 17:31:19
Message-Id: 201005281830.13728.michaelkintzios@gmail.com
In Reply to: Re: [gentoo-user] Starting up gpg-agent (and ssh-agent?) by Mick
1 On Tuesday 25 May 2010 22:59:45 you wrote:
2 > On Tuesday 25 May 2010 20:05:12 Alan McKinnon wrote:
3 > > On Tuesday 25 May 2010 17:02:55 Mick wrote:
4 > > > Hi All,
5 > > >
6 > > > I have asked a similar question on this M/L in the past. There seems
7 > > > to be different ways of making sure that gpg-agent is started prior to
8 > > > the desktop being launched, but I can't get any of these to work with
9 > > > enlightenment, which I am currently trying out.
10 > > >
11 > > > Previously, I was using almost exclusively Fluxbox, which when started
12 > > > with startx uses /etc/X11/xinit/xinitrc.d/20-gpg-agent as detailed
13 > > > here:
14 > > >
15 > > > http://bugs.gentoo.org/show_bug.cgi?id=258944
16 > > >
17 > > > Starting Fluxbox using xdm was less successful. It doesn't seem to
18 > > > read /etc/X11/xinit/xinitrc.d/20-gpg-agent. I also tried different
19 > > > things like using ~/.xsession, or ~/.xinitrc, or hacking
20 > > > /etc/X11/Sessions/fluxbox, but nothing appeared to work cleanly.
21 > > >
22 > > > Now I use kdm (with /etc/init.d/xdm) to launch enlightenment, but kdm
23 > > > does not read /etc/X11/xinit/xinitrc.d/20-gpg-agent either. When kdm
24 > > > is used to launch KDE then the file /etc/kde/startup/agent-startup.sh
25 > > > is parsed and everything works as expected within KDE. Enlightenment
26 > > > does not have anything similar and kdm itself does not read
27 > > > /etc/kde/startup/agent-startup.sh.
28 > > >
29 > > > What would you recommend I use to launch gpg-agent so that it works
30 > > > with kdm/Enlightenment?
31 > >
32 > > display managers do not use *xinitrc*, that is why it is failing with
33 > > every dm you have tried
34 > >
35 > > Those files are read by startx and you should treats them as if they are
36 > > read only by startx
37 >
38 > Ahhh! I see ...
39 >
40 > > You have already found the correct way to start apps in kdm, that is
41 > > where you should launch gpg-agent
42 >
43 > Hmmm, you lost me there Alan. I have noticed that launching KDE with kdm
44 > reads the /etc/kde/startup/agent-startup.sh file, but that is not the case
45 > when I use kdm to launch other WMs, like fluxbox or enlightenment.
46 >
47 > Enlightenment has its own startup directory for launching applications at
48 > start up (.e/e/applications/startup/), but placing in there the agent-
49 > startup.sh file does not launch gpg-agent. :-(
50
51 This was simpler than I thought. The 'Custom' session in the kdm drop down
52 actually reads ~/.xsession, instead of
53 /usr/share/apps/kdm/sessions/fluxbox.desktop. Once I discovered that I added
54 this much in it just before the exec line and it works just fine!
55 ==================================
56 if [ -x /usr/bin/gpg-agent ]; then
57 kill $(ps ux | awk '/gpg-agent/ && !/awk/ {print $2}') >/dev/null 2>&1
58 fi
59
60 if [ -x /usr/bin/gpg-agent ]; then
61 eval "$(/usr/bin/gpg-agent --daemon)"
62 fi
63
64 exec /usr/bin/enlightenment_start
65 ==================================
66
67 --
68 Regards,
69 Mick

Attachments

File name MIME type
signature.asc application/pgp-signature