Gentoo Archives: gentoo-user

From: Mick <michaelkintzios@×××××.com>
To: gentoo-user@l.g.o
Subject: Re: [gentoo-user] Starting up gpg-agent script
Date: Mon, 15 Mar 2010 13:33:58
Message-Id: 358eca8f1003150632o26248fafu250ef9af4e7c0341@mail.gmail.com
In Reply to: Re: [gentoo-user] Starting up gpg-agent script by Neil Bothwick
1 On 14 March 2010 21:30, Neil Bothwick <neil@××××××××××.uk> wrote:
2 > On Sun, 14 Mar 2010 20:23:40 +0000, Mick wrote:
3 >
4 >> I am trying this script in /etc/env.d/90gpg-agent:
5 >> ================================
6 >> if test -f $HOME/.gpg-agent-info && kill -0 `cut -d: -f 2
7 >> $HOME/.gpg-agent-info` 2>/dev/null; then
8 >>     GPG_AGENT_INFO=`cat $HOME/.gpg-agent-info`
9 >>     export GPG_AGENT_INFO
10 >> else
11 >>     eval `/usr/bin/gpg-agent --daemon`
12 >>     echo $GPG_AGENT_INFO >$HOME/.gpg-agent-info
13 >> fi
14 >> ================================
15 >>
16 >> But when I emerged kgpg I got this error:
17 >> ================================
18 >> !!! 'ParseError: Invalid token 'test' (not '='):
19 >> /etc/env.d/90gpg-agent: line 1 in /etc/env.d/90gpg-agent'
20 >> ================================
21 >>
22 >> Can you please help me correct the above script, I'm not sure
23 >> what's wrong with it.
24 >
25 > env-update doesn't evaluate scripts. It expects only variable assignments.
26
27 Ahh! Didn't know that. Thanks. :-)
28
29 > You mention kgpg, are you using KDE? If so, it takes care of this
30 > automatically, you only need to uncomment the relevant lines in the agent
31 > startup and shutdown scripts in /etc/kde. Otherwise, put the script in a
32 > file in /etc/profile.d.
33
34 I only use a few KDE apps. rather than the full DE. I used to have an
35 one-liner in /etc/X11/Sessions/fluxbox, but that means if I choose
36 another WM/DE the previous gpg-agent is still running. Meanwhile, I
37 found this:
38
39 http://bugs.gentoo.org/258944
40
41 will give it a spin and see how it goes.
42 --
43 Regards,
44 Mick

Replies

Subject Author
Re: [gentoo-user] Starting up gpg-agent script Mick <michaelkintzios@×××××.com>