setting env vars for gpg-agent

Richard Ulrich ricul77 at gmail.com
Sat Sep 13 22:02:31 CEST 2014


After gpg-agent stopped to work for ssh auth from OpenPGP smartcard
after some ubuntu upgrade a while back, I launch it and set the env
variables in ~/.bashrc. 
Since then I have to launch evolution from the terminal to have gnupg
correctly work with it. But even if I launch firefox from the terminal,
it doesn't seem to get the settings for enigform. 
Where would be a better place for that. The gnupg docs suggest
~/.xsession. But that file didn't exist on my machine, 
 and since unity is not based on X11 I doubth that it is read at all. In
fact, I just copied the relevant lines from my .bashrc to .xsession and
it didn't work neither for evolution nor for firefox.
Also ~/.profile doesn't seem to be the right place, as it just
calls .bashrc

These are my lines in .bashrc:

# If the agent is not already running, start it
if ! ps aux | grep -q [e]nable-ssh-support; then
    /usr/bin/gpg-agent --daemon --enable-ssh-support --write-env-file
"${HOME}/.gpg-agent-info" > /dev/null
fi;

#And then read info back
eval $(cat $HOME/.gpg-agent-info) > /dev/null

And here is the documentation I was referring to:
https://www.gnupg.org/documentation/manuals/gnupg/Invoking-GPG_002dAGENT.html

So, where should I put those lines for that firefox receives the correct
env vars?

Rgds
Richard





More information about the Gnupg-users mailing list