Closed pSub closed 10 years ago
-1 for this patch. I prefer the exec-style invocation of gpg-agent over eval.
If your shell environment lacks the necessary settings to use the agent, then you probably need to source "$HOME/.gpg-agent-info". I have the following code in my ~/.bashrc:
if [ -f "${HOME}/.gpg-agent-info" ]; then
source "${HOME}/.gpg-agent-info"
export GPG_AGENT_INFO
export SSH_AUTH_SOCK
fi
Thanks, I will try this.
Actually, why is the exec style better? It's confusing and less efficient (because we have to go through the whole session script again - praying that we don't get an infinite loop).
Interesting, I didn't see it that way. You may be right ... maybe we should use the --daemon
mode instead of exec.
Well, here is another question: since the daemon writes its settings to ~/.gpg-agent-info
, do we need to eval its output at all?
OTOH, the advantage of exec is that you know for sure that gpg-agent / ssh-agent will exit when you log out. Not sure what will happen if they're backgrounded as a daemon...
It works for me now and this repository is obsolete anyway, so I close this PR.
I experience problems with ssh support of gpg-agent. The password management does not work, i.e. pinentry is not started and passwords are not remembered. Since it does work for others in #nixos I am doing something wrong, or at least different. The attached changes resolve the problem for me, so it seems that environment variables are not set correctly for me.
I will investigate further to see what causes the problem, to see if those changes are really needed.
My xinit/xsession file is located here: https://github.com/pSub/configs/blob/master/.xinitrc