LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Newbie (https://www.linuxquestions.org/questions/linux-newbie-8/)
-   -   invoking the GPC-AGENT and to initially firing up the agent to run enigmail (https://www.linuxquestions.org/questions/linux-newbie-8/invoking-the-gpc-agent-and-to-initially-firing-up-the-agent-to-run-enigmail-4175463441/)

sayhello_to_the_world 05-25-2013 06:57 PM

invoking the GPC-AGENT and to initially firing up the agent to run enigmail
 
hello dear linux-friends,



i currently stuck to the process "invoking the GPC-AGENT" , as a prerequisite for Thunderbird and enigmail.


i am trying to initially firing up the agent to run enigmail
i am currently configuring all the prerequesites for the thunderbird and enigmail

at the moment i have a vanilla-installation of opensuse 12.3 on my notebook - all is fresh - no old data or credentials are used.
The whole systme is new and fresh.

see the following data - of the operating system and the rest of fresh installation
note - i do not need to import all the mails - i only need to import the credentials. and i have managed this.

so to sume up what is gained: what is on the machine; - the following things:

Quote:

operating-system; OpenSuse 12.3
Thunderbird Version 17.0.5
gpg2 - GnuPG 2
GnuPG 2 is the successor of "GnuPG" or GPG. It provides: GPGSM, gpg-agent, and a keybox library.
version 2.0.19-5.1.1. i 586 OpenSuse 12.3-1.7 mit Prioritäg 99
libassuan0 - IPC library used by GnuPG version 2
version 2.0.3-2.1.1 i586 OpenSuse 12.3-1.7 mit Prioritäg 99
libgpgme11 - a library that allows the access of programmes to GnuPG.


again: well and i ve done a import of the credentials and password files into the KGpg
in KGpg all the passwords are included.

By the way - i do not want to use openPGP. i prefer the usage of KGpg

The question now is: how to proceed the next steps are to look for the correct installation and configuring of gnupg.

Code:

martin@linux-70ce:~/perl>
martin linux-70ce:~/perl>      gpg --version
gpg (GnuPG) 2.0.19
libgcrypt 1.5.0
Copyright (C) 2012 Free Software Foundation, Inc.
License GPLv3+: GNU GPL version 3 or later <http://gnu.org/licenses/gpl.html>
This is free software: you are free to change and redistribute it.
There is NO WARRANTY, to the extent permitted by law.

Home: ~/.gnupg
Unterstützte Verfahren:
Öff. Schlüssel: RSA, ELG, DSA
Verschlü.: IDEA, 3DES, CAST5, BLOWFISH, AES, AES192, AES256, TWOFISH, CAMELLIA128,
            CAMELLIA192, CAMELLIA256
Hash: MD5, SHA1, RIPEMD160, SHA256, SHA384, SHA512, SHA224
Komprimierung: nicht komprimiert, ZIP, ZLIB, BZIP2
martin linux-70ce:~/perl> ^C
martin linux-70ce:~/perl>

On this page here - Invoking GPG-AGENT - Using the GNU Privacy Guard a short descripton on Invoking GPG-AGENT shows how to do things.


question: how to invoke the gnupg? and very very important for me is the question - Do i have to invoke this GPC-AGENT for one or how many user!?


It is best not to run multiple instance of the gpg-agent, so you should make sure that only one is running.

How to make sure that i do invoke the GPC-AGENT only one time and not twice or three times.

Which steps are needet - what do i need to get enigmail up and running!?

love to hear from you

greetings

2 Invoking GPG-AGENT

gpg-agent is a daemon to manage secret (private) keys independently from any protocol. It is used as a backend for gpg and gpgsm as well as for a couple of other utilities. The usual way to run the agent is from the ~/.xsession file:

Code:

    eval $(gpg-agent --daemon)

If you don't use an X server, you can also put this into your regular startup file ~/.pro file or .bash_profile.
It is best not to run multiple instance of the gpg-agent, so you should make sure that only one is running:
gpg-agent uses an environment variable to inform clients about the communication parameters. You can write
the content of this environment variable to a file so that you can test for a running agent.
Here is an example using Bourne shell syntax:


Code:

    gpg-agent --daemon --enable-ssh-support \
              --write-env-file "${HOME}/.gpg-agent-info"

This code should only be run once per user session to initially fire up the agent.
In the example the optional support for the included Secure Shell agent is enabled and the information about the agent is written to a file in the HOME directory. Note that by running gpg-agent without arguments you may test whether an agent is already running;
however such a test may lead to a race condition, thus it is not suggested.


The second script needs to be run for each interactive session:



Code:

    if [ -f "${HOME}/.gpg-agent-info" ]; then
      . "${HOME}/.gpg-agent-info"
      export GPG_AGENT_INFO
      export SSH_AUTH_SOCK
    fi


see also:
Invoking GPG-AGENT - Using the GNU Privacy Guard


love to hear from you

greetings

unSpawn 05-26-2013 01:13 PM

Quote:

Originally Posted by sayhello_to_the_world (Post 4958930)
question: how to invoke the gnupg?

If I read the text right this is what you should do:

0. Add this to the end of the users ~/.xsession file:
Code:

pgrep gpg-agent >/dev/null 2>&1 ||
 \eval $(gpg-agent --daemon --enable-ssh-support --write-env-file "${HOME}/.gpg-agent-info")

1. Add this to the end of the users ~/.bash_profile:
Code:

pgrep gpg-agent >/dev/null 2>&1 ||\
 gpg-agent --daemon --enable-ssh-support --write-env-file "${HOME}/.gpg-agent-info"

2. Create a script called "/etc/profile.d/gpg-agent.sh" with these contents:
Code:

if [ -f "${HOME}/.gpg-agent-info" ]; then
 . "${HOME}/.gpg-agent-info"
 export GPG_AGENT_INFO
 export SSH_AUTH_SOCK
fi


Quote:

Originally Posted by sayhello_to_the_world (Post 4958930)
and very very important for me is the question - Do i have to invoke this GPC-AGENT for one or how many user!?

As GnuPG keys are private each user needs to activate the agent themselves once.

sayhello_to_the_world 05-26-2013 02:07 PM

hello dear unSpawn

many many thanks for this superb posting. You guy rock!!!! And you deserve a monster-congratulation.


many many thanks for the answers and the supportive guidance. Now the probllems are solved.

All runs nicely and the thunderbird works as it should. i can read the encrypted mails.
So - to say it in one word,. i finally was able to port over the thunderbird with all the necessary things on a second notebook.

And i am able to work with it - with enigmail and all the needed stuff.

#
unSpawn - you deserve a monster-congratulation.

many thanks
say




Quote:

Originally Posted by unSpawn (Post 4959326)
If I read the text right this is what you should do:

0. Add this to the end of the users ~/.xsession file:
Code:

pgrep gpg-agent >/dev/null 2>&1 ||
 \eval $(gpg-agent --daemon --enable-ssh-support --write-env-file "${HOME}/.gpg-agent-info")

1. Add this to the end of the users ~/.bash_profile:
Code:

pgrep gpg-agent >/dev/null 2>&1 ||\
 gpg-agent --daemon --enable-ssh-support --write-env-file "${HOME}/.gpg-agent-info"

2. Create a script called "/etc/profile.d/gpg-agent.sh" with these contents:
Code:

if [ -f "${HOME}/.gpg-agent-info" ]; then
 . "${HOME}/.gpg-agent-info"
 export GPG_AGENT_INFO
 export SSH_AUTH_SOCK
fi



As GnuPG keys are private each user needs to activate the agent themselves once.


unSpawn 05-26-2013 03:17 PM

Quote:

Originally Posted by sayhello_to_the_world (Post 4959354)
many many thanks for the answers and the supportive guidance. Now the probllems are solved.

Well, actually you posted those commands yourself but OK, you're welcome.


Quote:

Originally Posted by sayhello_to_the_world (Post 4959354)
All runs nicely and the thunderbird works as it should.

That's good to hear. Have fun with it!


All times are GMT -5. The time now is 06:34 PM.