Hi all! I am on a SuSE 9.2 system tring to set up Kmail to use encryption as descriped on http://kmail.kde.org/kmail-pgpmime-howto.html I installed a standard KDE system via Yast, and added apt after that. Then i dist-upgraded the whole system to get KDE 3.4 among other things. But now as i am trying to get gpg-agent to run as expected, but it doesn't seem to want to export the GPG_AGENT_INFO as prescribed. sparhawk:/home/rikjoh # rpm -q gpg2 gpg2-1.9.10-3.2 sparhawk:/home/rikjoh # gpg-agent -v --daemon gpg-agent[32048]: Secure memory is not locked into core gpg-agent[32048]: NOTE: this is a development version! gpg-agent[32048]: listening on socket `/tmp/gpg-8Wz2dm/S.gpg-agent' GPG_AGENT_INFO=/tmp/gpg-8Wz2dm/S.gpg-agent:32049:1; export GPG_AGENT_INFO; rikjoh@sparhawk:~> echo $GPG_AGENT_INFO rikjoh@sparhawk:~> gpg-agent -? gpg-agent (GnuPG) 1.9.10 Copyright (C) 2004 Free Software Foundation, Inc. This program comes with ABSOLUTELY NO WARRANTY. This is free software, and you are welcome to redistribute it under certain conditions. See the file COPYING for details. < lines cut> And as the $GPG_AGENT_INFO contains nil, programs that rely on it malfunctions. Any clues? -- /Rikard " Sharing knowledge is the most fundamental act of friendship. Because it is a way you can give something without loosing something." -R. Stallman --------------------------------------------------------------- Rikard Johnels email : rikjoh@norweb.se Web : http://www.rikjoh.com/users/rikjoh Mob : +46 735 05 51 01 PGP : 0x461CEE56 ---------------------------------------------------------------
Rikard Johnels <rikjoh@norweb.se> writes:
sparhawk:/home/rikjoh # gpg-agent -v --daemon gpg-agent[32048]: Secure memory is not locked into core gpg-agent[32048]: NOTE: this is a development version! gpg-agent[32048]: listening on socket `/tmp/gpg-8Wz2dm/S.gpg-agent' GPG_AGENT_INFO=/tmp/gpg-8Wz2dm/S.gpg-agent:32049:1; export GPG_AGENT_INFO; rikjoh@sparhawk:~> echo $GPG_AGENT_INFO
And as the $GPG_AGENT_INFO contains nil, programs that rely on it malfunctions.
Any clues?
When you invoke gpg-agent, it sends output to STDOUT, which needs to be interpreted by your shell to create the environment variable. See that line:
GPG_AGENT_INFO=/tmp/gpg-8Wz2dm/S.gpg-agent:32049:1; export GPG_AGENT_INFO;
above? That was supposed to be input to your shell. You can make that happen by doing: ,---- | sparhawk:/home/rikjoh # eval `gpg-agent -v --daemon` `---- The "eval `x`" means that the command x will produce some output, which I want to send to the shell as input. Because gpg-agent is running in a separate process, this is the only way it can set an environment variable in your shell. -- Alan Hadsell If brute force doesn't work, you aren't using enough.
On Friday 29 April 2005 21.17, Alan Hadsell wrote:
Rikard Johnels <rikjoh@norweb.se> writes:
sparhawk:/home/rikjoh # gpg-agent -v --daemon gpg-agent[32048]: Secure memory is not locked into core gpg-agent[32048]: NOTE: this is a development version! gpg-agent[32048]: listening on socket `/tmp/gpg-8Wz2dm/S.gpg-agent' GPG_AGENT_INFO=/tmp/gpg-8Wz2dm/S.gpg-agent:32049:1; export GPG_AGENT_INFO; rikjoh@sparhawk:~> echo $GPG_AGENT_INFO
And as the $GPG_AGENT_INFO contains nil, programs that rely on it malfunctions.
Any clues?
When you invoke gpg-agent, it sends output to STDOUT, which needs to be interpreted by your shell to create the environment variable. See
that line:
GPG_AGENT_INFO=/tmp/gpg-8Wz2dm/S.gpg-agent:32049:1; export GPG_AGENT_INFO;
above? That was supposed to be input to your shell. You can make that happen by doing:
,----
| sparhawk:/home/rikjoh # eval `gpg-agent -v --daemon`
`----
The "eval `x`" means that the command x will produce some output, which I want to send to the shell as input.
Because gpg-agent is running in a separate process, this is the only way it can set an environment variable in your shell.
-- Alan Hadsell If brute force doesn't work, you aren't using enough. Does that mean that gpg-agent fails to export the $GPG_AGENT_INFO if it is started in the bootprocess?
I dont care how it exports its values as long as it works. And now it doesnt! -- /Rikard " Sharing knowledge is the most fundamental act of friendship. Because it is a way you can give something without loosing something." -R. Stallman --------------------------------------------------------------- Rikard Johnels email : rikjoh@norweb.se Web : http://www.rikjoh.com/users/rikjoh Mob : +46 735 05 51 01 PGP : 0x461CEE56 ---------------------------------------------------------------
"\"Rikard Johnels\"" <rikjoh@norweb.se> writes:
Does that mean that gpg-agent fails to export the $GPG_AGENT_INFO if it is started in the bootprocess?
It's not that gpg-agent fails to export the data. It provides the information, but you are invoking in in a way that causes the information not to be saved. If you invoke it during the boot process, you will have to find a way to get the information passed in the environment to all descendant processes. The system does not provide such a method, because gpg-agent is not really intended to be used that way. Most people invoke it either in their login shell, or in the process that starts the X Window System.
I dont care how it exports its values as long as it works. And now it doesnt!
It's doing exactly what it's supposed to. You're using it wrong. -- Alan Hadsell If brute force doesn't work, you aren't using enough.
On Friday 29 April 2005 22.17, Alan Hadsell wrote:
"\"Rikard Johnels\"" <rikjoh@norweb.se> writes:
Does that mean that gpg-agent fails to export the $GPG_AGENT_INFO if it is started in the bootprocess?
It's not that gpg-agent fails to export the data. It provides the information, but you are invoking in in a way that causes the information not to be saved.
If you invoke it during the boot process, you will have to find a way to get the information passed in the environment to all descendant processes. The system does not provide such a method, because gpg-agent is not really intended to be used that way. Most people invoke it either in their login shell, or in the process that starts the X Window System.
I dont care how it exports its values as long as it works. And now it doesnt!
It's doing exactly what it's supposed to. You're using it wrong.
-- Alan Hadsell If brute force doesn't work, you aren't using enough.
So exactly DO i use it the right way? I havent found any clues when googling for it. All i know is that it "aint starting right". And that kgpg cries about it at startup. -- /Rikard " Sharing knowledge is the most fundamental act of friendship. Because it is a way you can give something without loosing something." -R. Stallman --------------------------------------------------------------- Rikard Johnels email : rikjoh@norweb.se Web : http://www.rikjoh.com/users/rikjoh Mob : +46 735 05 51 01 PGP : 0x461CEE56 ---------------------------------------------------------------
"\"Rikard Johnels\"" <rikjoh@norweb.se> writes:
So exactly DO i use it the right way? I havent found any clues when googling for it. All i know is that it "aint starting right". And that kgpg cries about it at startup.
You do it exactly the way I told you to, in my first message:
,---- | sparhawk:/home/rikjoh # eval `gpg-agent -v --daemon` `----
The "eval `x`" means that the command x will produce some output, which I want to send to the shell as input.
Because gpg-agent is running in a separate process, this is the only way it can set an environment variable in your shell.
Also: you seem to be running gpg-agent as root. If you run it as root, you will not be able to access it as any user other than root. should plan on running a separate copy of the agent for each user ID. -- Alan Hadsell If brute force doesn't work, you aren't using enough.
/ 2005-04-29 17:50:46 -0400 \ Alan Hadsell:
"\"Rikard Johnels\"" <rikjoh@norweb.se> writes:
So exactly DO i use it the right way? I havent found any clues when googling for it.
That is hard to believe...
All i know is that it "aint starting right". And that kgpg cries about it at startup.
Anyways. I don't remember how exactly this thread started, but just in case it was "it worked before, and since I upgraded kde it does not anymore", maybe it helps to doublecheck that your /etc/opt/kde3/share/config/kdm/kdmrc has in section [X-*-Core] the line Session=/etc/X11/xdm/Xsession # # this was the important part. rumor has it that above line somehow got # lost in some kde update. not for me, though. (yet) # (which should all be default settings for suse). and, to use SuSEs default setup further, you do NOT have your own ~/.xsession, or ~/.xinitrc. then this will end up calling /usr/X11R6/lib/X11/xdm/sys.xsession which finally should via some more levels of indirection exec gpg-agent --daemon --no-detach --keep-display ssh-agent $WINDOWMANAGER (still all suse default settings, so do not mess with those scripts). ============================== if you really want to know more about some program installed from an rpm on your box, check its documentations. "I want to know about gpg-agent" hm. ] rpm -qdf `which gpg-agent` /usr/share/doc/packages/gpg2/ABOUT-NLS /usr/share/doc/packages/gpg2/AUTHORS /usr/share/doc/packages/gpg2/COPYING /usr/share/doc/packages/gpg2/ChangeLog /usr/share/doc/packages/gpg2/INSTALL /usr/share/doc/packages/gpg2/NEWS /usr/share/doc/packages/gpg2/README /usr/share/doc/packages/gpg2/THANKS /usr/share/doc/packages/gpg2/TODO /usr/share/doc/packages/gpg2/VERSION /usr/share/info/gnupg2.info.gz hm. ] info gnupg2 File: gnupg.info, Node: Top, Next: Invoking GPGSM, Up: (dir) Introduction ************ This manual documents how to use the GNU Privay Guard system as well as the administration and the architecture. * Menu: * Invoking GPGSM:: Using the S/MIME protocol. * Invoking GPG-AGENT:: How to launch the secret key daemon. * Invoking SCDAEMON:: How to handle Smartcards. ... hm. [down down down down ... enter] Oooh, surprise, its all there: File: gnupg.info, Node: Invoking GPG-AGENT, Invoking GPG-AGENT ****************** GPG-AGENT is a daemon to manage secret (private) keys independelty from any protocol. It is used as a backend for GPG and GPGSM as well as for a couple of other utilities. ... explanations ... examples ... hth.
participants (4)
-
"Rikard Johnels"
-
Alan Hadsell
-
Lars Ellenberg
-
Rikard Johnels