Comment 2 for bug 684902

I had a similar issue on KDE 4.6 RC. This works for me :

Add keep-dipslay and display options in ~/.gnupg/gpg-agent.conf :

pinentry-program /usr/bin/pinentry-qt4
display :0.0
default-cache-ttl 86400
max-cache-ttl 86400

Create a file under the directory ~/.kde/env/ . I named it (don't forget to make it executable):

eval `gpg-agent --daemon`

Also create the directory ~/.kde/shutdown/ and place another shell script in it (e.g. again with the following contents:

[ -n "${GPG_AGENT_INFO}" ] && kill `echo "${GPG_AGENT_INFO}" | cut -d ':' -f 2`