View previous topic :: View next topic |
Author |
Message |
chaoscommander Tux's lil' helper

Joined: 15 Oct 2012 Posts: 111
|
Posted: Sun May 03, 2015 12:03 pm Post subject: GPG not remembering passphrase |
|
|
I've Googled for half an hour, found some solutions for Ubuntu that all involve system settings managers I don't have on Gentoo, followed the GnuPG manual on the Gentoo wiki and I still can't figure out what's wrong here. My gpg-agent doesn't remember my passphrase and keeps asking me for it.
Setup:
Thunderbird 31.6.0 with USE=crypt
gnupg 2.0.26-r3
KDE 4.14.3
Steps taken:
put a script autostarting gpg-agent --daemon into ~/.kde4/env
set passphrase timeout to 1800 seconds in ~/.gnupg/gpg-agent.conf
started gpg-agent --daemon manually
restarted Thunderbird
Am I missing something? |
|
Back to top |
|
 |
Hu Administrator

Joined: 06 Mar 2007 Posts: 23280
|
Posted: Sun May 03, 2015 4:43 pm Post subject: |
|
|
When you run the agent with --daemon, it prints the environment variables that you must set in order for other programs to use it. Are these variables being exported to Thunderbird? |
|
Back to top |
|
 |
toralf Developer


Joined: 01 Feb 2004 Posts: 3943 Location: Hamburg
|
Posted: Sun May 03, 2015 4:54 pm Post subject: |
|
|
Shouldn't gpg-agent be started/stopped in with /etc/kde/startup/agent-startup.sh ?
Furthermore I do have set SSH_ASKPASS=/usr/bin/ksshaskpass here too via /etc/env.d/99ssh_askpass . AN FWIW : Code: | tfoerste@t44 ~ $ cat ~/.gnupg/gpg-agent.conf
###+++--- GPGConf ---+++###
debug-level basic
log-file socket:///home/tfoerste/.gnupg/log-socket
default-cache-ttl 5400
max-cache-ttl 54000
###+++--- GPGConf ---+++### Sun 19 Apr 2015 11:33:04 AM CEST
# GPGConf edited this configuration file.
# It will disable options before this marked block, but it will
# never change anything below these lines.
pinentry-program /usr/bin/pinentry
no-grab
default-cache-ttl 5400
|
|
|
Back to top |
|
 |
chaoscommander Tux's lil' helper

Joined: 15 Oct 2012 Posts: 111
|
Posted: Sun May 10, 2015 5:30 pm Post subject: |
|
|
Hu wrote: | Are these variables being exported to Thunderbird? |
How can I tell? Once I could set Thunderbird to use/not use gpg-agent, but now it appears to have some kind of autodetection which is (at least GUI-wise) a black box.
I just checked.. running gpg-agent --daemon doesn't cause the variables to be exported, the export command just comes out as output (is that intentional?). I now exported them manually and restarted Thunderbird, but that also didn't do the trick.
Quote: | Shouldn't gpg-agent be started/stopped in with /etc/kde/startup/agent-startup.sh ? |
https://wiki.gentoo.org/wiki/GnuPG#Automatically_starting_the_GPG_agent says both are possible.
What would this have to do with SSH_ASKPASS? |
|
Back to top |
|
 |
Hu Administrator

Joined: 06 Mar 2007 Posts: 23280
|
Posted: Mon May 11, 2015 1:37 am Post subject: |
|
|
chaoscommander wrote: | Hu wrote: | Are these variables being exported to Thunderbird? |
How can I tell? Once I could set Thunderbird to use/not use gpg-agent, but now it appears to have some kind of autodetection which is (at least GUI-wise) a black box.
I just checked.. running gpg-agent --daemon doesn't cause the variables to be exported, the export command just comes out as output (is that intentional?). I now exported them manually and restarted Thunderbird, but that also didn't do the trick. | You can tell by inspecting the Thunderbird process environment via /proc or by restarting it with the variables explicitly set, as you did. Yes, it is intentional that it only prints the commands, because no process can directly modify the environment of another existing process. If you run multiple gpg operations from the terminal that restarted Thunderbird, does the gpg-agent cache the passphrase for those gpg invocations? |
|
Back to top |
|
 |
chaoscommander Tux's lil' helper

Joined: 15 Oct 2012 Posts: 111
|
Posted: Tue May 19, 2015 3:33 pm Post subject: |
|
|
I didn't touch anything for a few days (I may have restarted xdm at some point) and now gpg has started caching the passphrase, just as I wanted it to. It could be that restarting xdm was mandatory, but can't really tell if that was the solution because I haven't used Enigmail in the meantime. Anyway, it works, for now. |
|
Back to top |
|
 |
|