public inbox for gentoo-user@lists.gentoo.org
 help / color / mirror / Atom feed
* [gentoo-user] Starting up gpg-agent script
@ 2010-03-14 20:23 Mick
  2010-03-14 21:30 ` Neil Bothwick
  0 siblings, 1 reply; 4+ messages in thread
From: Mick @ 2010-03-14 20:23 UTC (permalink / raw
  To: gentoo-user

Hi All,

I am trying this script in /etc/env.d/90gpg-agent:
================================
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
================================

But when I emerged kgpg I got this error:
================================
!!! 'ParseError: Invalid token 'test' (not '='): 
/etc/env.d/90gpg-agent: line 1 in /etc/env.d/90gpg-agent'
================================

Can you please help me correct the above script, I'm not sure 
what's wrong with it.
-- 
Regards,
Mick



^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: [gentoo-user] Starting up gpg-agent script
  2010-03-14 20:23 [gentoo-user] Starting up gpg-agent script Mick
@ 2010-03-14 21:30 ` Neil Bothwick
  2010-03-15 13:32   ` Mick
  0 siblings, 1 reply; 4+ messages in thread
From: Neil Bothwick @ 2010-03-14 21:30 UTC (permalink / raw
  To: gentoo-user

[-- Attachment #1: Type: text/plain, Size: 1194 bytes --]

On Sun, 14 Mar 2010 20:23:40 +0000, Mick wrote:

> I am trying this script in /etc/env.d/90gpg-agent:
> ================================
> 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
> ================================
> 
> But when I emerged kgpg I got this error:
> ================================
> !!! 'ParseError: Invalid token 'test' (not '='): 
> /etc/env.d/90gpg-agent: line 1 in /etc/env.d/90gpg-agent'
> ================================
> 
> Can you please help me correct the above script, I'm not sure 
> what's wrong with it.

env-update doesn't evaluate scripts. It expects only variable assignments.

You mention kgpg, are you using KDE? If so, it takes care of this
automatically, you only need to uncomment the relevant lines in the agent
startup and shutdown scripts in /etc/kde. Otherwise, put the script in a
file in /etc/profile.d.


-- 
Neil Bothwick

Top Oxymorons Number 17: Clearly misunderstood

[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 198 bytes --]

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: [gentoo-user] Starting up gpg-agent script
  2010-03-14 21:30 ` Neil Bothwick
@ 2010-03-15 13:32   ` Mick
  2010-03-15 23:53     ` Mick
  0 siblings, 1 reply; 4+ messages in thread
From: Mick @ 2010-03-15 13:32 UTC (permalink / raw
  To: gentoo-user

On 14 March 2010 21:30, Neil Bothwick <neil@digimed.co.uk> wrote:
> On Sun, 14 Mar 2010 20:23:40 +0000, Mick wrote:
>
>> I am trying this script in /etc/env.d/90gpg-agent:
>> ================================
>> 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
>> ================================
>>
>> But when I emerged kgpg I got this error:
>> ================================
>> !!! 'ParseError: Invalid token 'test' (not '='):
>> /etc/env.d/90gpg-agent: line 1 in /etc/env.d/90gpg-agent'
>> ================================
>>
>> Can you please help me correct the above script, I'm not sure
>> what's wrong with it.
>
> env-update doesn't evaluate scripts. It expects only variable assignments.

Ahh!  Didn't know that.  Thanks.  :-)

> You mention kgpg, are you using KDE? If so, it takes care of this
> automatically, you only need to uncomment the relevant lines in the agent
> startup and shutdown scripts in /etc/kde. Otherwise, put the script in a
> file in /etc/profile.d.

I only use a few KDE apps. rather than the full DE.  I used to have an
one-liner in /etc/X11/Sessions/fluxbox, but that means if I choose
another WM/DE the previous gpg-agent is still running.  Meanwhile, I
found this:

http://bugs.gentoo.org/258944

will give it a spin and see how it goes.
-- 
Regards,
Mick



^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: [gentoo-user] Starting up gpg-agent script
  2010-03-15 13:32   ` Mick
@ 2010-03-15 23:53     ` Mick
  0 siblings, 0 replies; 4+ messages in thread
From: Mick @ 2010-03-15 23:53 UTC (permalink / raw
  To: gentoo-user

[-- Attachment #1: Type: Text/Plain, Size: 1867 bytes --]

On Monday 15 March 2010 13:32:51 you wrote:
> On 14 March 2010 21:30, Neil Bothwick <neil@digimed.co.uk> wrote:
> > On Sun, 14 Mar 2010 20:23:40 +0000, Mick wrote:
> >> I am trying this script in /etc/env.d/90gpg-agent:
> >> ================================
> >> 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
> >> ================================
> >>
> >> But when I emerged kgpg I got this error:
> >> ================================
> >> !!! 'ParseError: Invalid token 'test' (not '='):
> >> /etc/env.d/90gpg-agent: line 1 in /etc/env.d/90gpg-agent'
> >> ================================
> >>
> >> Can you please help me correct the above script, I'm not sure
> >> what's wrong with it.
> >
> > env-update doesn't evaluate scripts. It expects only variable
> > assignments.
> 
> Ahh!  Didn't know that.  Thanks.  :-)
> 
> > You mention kgpg, are you using KDE? If so, it takes care of this
> > automatically, you only need to uncomment the relevant lines in the agent
> > startup and shutdown scripts in /etc/kde. Otherwise, put the script in a
> > file in /etc/profile.d.
> 
> I only use a few KDE apps. rather than the full DE.  I used to have an
> one-liner in /etc/X11/Sessions/fluxbox, but that means if I choose
> another WM/DE the previous gpg-agent is still running.  Meanwhile, I
> found this:
> 
> http://bugs.gentoo.org/258944
> 
> will give it a spin and see how it goes.

This works fine, as long as I start fluxbox from the console with startx, but 
not if I use xdm ... probably something to do with the former using xinit?

-- 
Regards,
Mick

[-- Attachment #2: This is a digitally signed message part. --]
[-- Type: application/pgp-signature, Size: 198 bytes --]

^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2010-03-16  0:10 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2010-03-14 20:23 [gentoo-user] Starting up gpg-agent script Mick
2010-03-14 21:30 ` Neil Bothwick
2010-03-15 13:32   ` Mick
2010-03-15 23:53     ` Mick

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox