Just a thought: Could we add the lines if test -x /usr/bin/gpg-agent then eval "$(/usr/bin/gpg-agent --daemon)" fi to the gentoo section of startkde? I'm using this for kmail and after an update of kde I need to redo this setting. If we would add this everyone could use the agent, if it were available. Thanks, Jan Reproducible: Always Steps to Reproduce:
Created attachment 36310 [details, diff] Patch for startkde version 3.2.3 This one fixes the problem in the described way. I did it for 3.2.3, but I think, it works the same way for other versions.
i think this is a good idea, will try and get in soon (for 3.3)
From startkde in 3.3: # Source scripts found in <localprefix>/env/*.sh and <prefixes>/env/*.sh # (where <localprefix> is $KDEHOME or ~/.kde, and <prefixes> is where KDE is installed) # # This is where you can define environment variables that will be available to # all KDE programs, so this is where you can run agents using e.g. eval `ssh-agent` # or eval `gpg-agent --daemon`. # Note: if you do that, you should also put "ssh-agent -k" as a shutdown script # # (see end of this file). # For anything else (that doesn't set env vars, or that needs a window manager), # better use the Autostart folder. exepath=`kde-config --path exe` for prefix in `echo "$exepath" | sed -e 's^/bin/^/env/^g;s^:^ ^g'`; do for file in "$prefix"*.sh; do test -r "$file" && . "$file" done done so, all we need is to drop a 'agents.sh' file in /usr/kde/3.3/env/ that runs 'eval `gpg-agent --daemon`' if gpg-agent is present
*** Bug 58954 has been marked as a duplicate of this bug. ***
i say we mark this a dupe of Bug 26970 having gpg-agent start all the time for kde users seems the wrong thing to do ... if someone wants encryption agents running, they should do it themselves (or in this case, keychain will be able to do it)
Actually, we can close it as the latest kde packages (> 3.3.0rc1) install the proper scripts to do this, though the lines in the scripts are commented out meaning you have to hand edit them to turn it on.
let me add, that with a recent (~x86) version of gpg the scripts provided with kde-3.3.1 dont shutdown gpg-agent correctly!
what version of gpg, and what's wrong exactly?
The problem in comment #7 is caused by two things: 1.) a missing executable flag on the shutdown script. For some reason the test for startup scripts in startkde uses -r (readable file) and sources them while the test for shutdown scripts uses -x (executable file) and runs them. It's beyond me why this is so, but making the shutdown script(s) executable solves the (first part of the) problem. I have filed a separate bug report #76719 for this. 2.) the shutdown script itself is wrong, gpg-agent doesn't know an option -k (at least not the one from gnupg-1.9.14). The following if [ -x /usr/bin/gpg-agent ]; then kill $(echo ${GPG_AGENT_INFO} | cut -d':' -f 2) 2>&1 >/dev/null fi works for me (although checking for the presence of the gpg-agent executable is maybe not the optimal thing to do). Filed bug report #76720 for that.