[ydl-gen] Where should init scripts go within enlightenment?

David Seikel dseikel at terrasoftsolutions.com
Sat Jun 23 23:14:55 MDT 2007


On Sat, 23 Jun 2007 11:51:08 -0400 Derick Centeno
<aguilarojo at verizon.net> wrote:

> On Fri, 15 Jun 2007 07:53:05 +1000
> David Seikel <onefang at gmail.com> wrote:
> 
> > On Thu, 14 Jun 2007 09:13:59 -0400 Derick Centeno
> > <aguilarojo at verizon.net> wrote:
> > 
> > > On Thu, 14 Jun 2007 03:41:32 -0500
> > > "Ron Rogers Jr." <CronoCloud at mchsi.com> wrote:
> > > 
> > > > On Wed, 13 Jun 2007 21:11:50 -0400
> > > > Derick Centeno <aguilarojo at verizon.net> wrote:
> > > > 
> > > > > Hi Ron
> > > > > 
> > > > > Thanks for your suggestions, but when I created the files and
> > > > > followed your instructions e17 ceased to work properly at
> > > > > all. snip...
> > > 
> > > > Sorry it didn't work, it does work for me, though
> > > > there are a there are a few things I thought of:
> > > > 
> > > > 1. It may be necessary to have the gpg-agent.desktop file in
> > > > ~/.e/e/applications/all as well.
> > > > 
> > > I tend to follow, as much as possible, an ideal I picked up from a
> > > professor regarding programming.  The concept essentially is one
> > > of emphasizing efficiency.  Duplicating one file in multiple
> > > places doesn't appear to implement that concept.
> > > 
> > > I believe such duplication implies a problem demanding a better
> > > strategy.
> > 
> > It's not a duplication, ~/.e/e/applications/all/ is the correct
> > place for the gpg-agent.desktop file.  ~/.e/e/applications/startup/
> > should only have it's .order file modified to add a reference to
> > that file. Add the reference with no path as was suggested in the
> > first place by Ron.
> > 
> > If you are still experimenting with this then I would simplify the
> > exec line in that .desktop file to just call gpg-agent directly,
> > and leave out the eval "$()" type stuff -
> > 
> > Exec=gpg-agent --daemon
> > 
> > Just tried to install gpg-agent on my ubuntu box for some quick
> > tests and failed coz the ubuntu repos are still screwed after a
> > month.  Guess I should install it under YDL and test it properly.
> > B-)
> 
> Hi Dave:
> The recommendation you suggested didn't work.  I look forward to when
> you decide to attempt a workable procedure which will function within
> YDL 5.

Finally got the thing installed so I could do a quick bit of
investigation.  I was right the first time, putting gpg-agent into
a .desktop file will not work.  gpg-agent returns a bit of text that
needs to be run via eval to create some environment variables.  For
example -

dvs1 at cluster:~$ gpg-agent --daemon
GPG_AGENT_INFO=/tmp/gpg-tdo8Y3/S.gpg-agent:29480:1; export
GPG_AGENT_INFO;

(The output is one line, my mail client wrapped it.)

This environment variable GPG_AGENT_INFO will be different each time
you run gpg-agent.  GPG_AGENT__INFO needs to be passed into the
environment of programs that need to use it.  Environment variables
usually get passed from parent program to child program.  So if
enlightenment is to pass it on to programs it starts up, then
GPG_AGENT_INFO needs to be passed to enlightenment by whatever program
starts enlightenment in the first place.  Which means that gpg-agent
has to run before enlightenment.

Using a script to start enlightenment is the best way to go.  You
basically need to get gdm (or whatever method you use to
start enlightenment) to run a script that looks a bit like this instead
of running enlightenment_start directly -

eval `gpg-agent --daemon`
enlighhtenment_start

I'm not that familiar with gdm, but I think it uses .desktop files
in /usr/share/xsession to determine what window managers it can start.

On the other hand, just in case you ever want to use some other window
manager, it would be better to start gpg-agent as part of the X session
startup.  /etc/X11/xinit/Xsession may be worth investigating.  Note the
use of SSH_AGENT, which is a similar environment variable for doing the
exact same thing for ssh.

The info page for gnupg also mentions a GPG_TTY environment variable,
and a pinentry program.  So just running gpg-agent is not the end of
the story.  The quick check to see if the above is working is to start
up a terminal from enlightenment and print the environment variables
value -

echo "$GPG_AGENT_INFO"

This is not so much an enlightenment issue, as an X or gdm issue,
gpg-agent needs to be run before the window manager.  Getting all this
to work properly under YDL is not currently on my TODO list.  Maybe if
you ask Kai nicely he will tell me to dedicate some time to it, or one
of the other engineers.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 189 bytes
Desc: not available
Url : http://lists.terrasoftsolutions.com/pipermail/yellowdog-general/attachments/20070624/20af59e0/attachment.bin 


More information about the yellowdog-general mailing list