Important edit:
The things almost work right know (I had put to open as a new session on system setings and reboot the computer).
When I tried to sign and encript a file with Kleopatra the pinentry appeared, but, disappeared before I input anything.
So, I think solving this, everything will work.
Appreciate help, thx.
The Question
I'm problem with signing messages on Kleopatra and KMail.
When I try sign files/e-mails I got a error: bad passphrase. Appreciate helps, thanks.
My sistem is:
Ubuntu 12.04 LTS \n \l
Linux Tevatron 3.2.0-24-generic #37-Ubuntu SMP Wed Apr 25 08:43:22 UTC 2012 x86_64 x86_64 x86_64 GNU/Linux
KDE:
4.8.2
Kleopatra:
Statup timing: 0 ms elapsed: Command line args created
Qt: 4.8.1
Plataforma de desenvolvimento KDE: 4.8.2 (4.8.2)
Kleopatra: 2.1.1
KMail:
Qt: 4.8.1
Plataforma de desenvolvimento KDE: 4.8.2 (4.8.2)
KMail: 4.8.2
gpg-agent:
gpg-agent (GnuPG) 2.0.17
libgcrypt 1.5.0
Copyright (C) 2011 Free Software Foundation, Inc. License GPLv3+: GNU GPL version 3 or later http://gnu.org/licenses/gpl.html This is free software: you are free to change and redistribute it. There is NO WARRANTY, to the extent permitted by law.
gpg:
Copyright (C) 2010 Free Software Foundation, Inc. License GPLv3+: GNU GPL version 3 or later http://gnu.org/licenses/gpl.html This is free software: you are free to change and redistribute it. There is NO WARRANTY, to the extent permitted by law.
Home: ~/.gnupg
Algoritmos suportados:
Chave pública: RSA, RSA-E, RSA-S, ELG-E, DSA
Criptografia: 3DES, CAST5, BLOWFISH, AES, AES192, AES256, TWOFISH, CAMELLIA128, CAMELLIA192, CAMELLIA256
Dispersão (Hash): MD5, SHA1, RIPEMD160, SHA256, SHA384, SHA512, SHA224
Compressão: não comprimido, ZIP, ZLIB, BZIP2
I tried create a file in ~/.kde/env named gpg-agent.sh and did it as executable. The content is:
#!/bin/bash
eval $(gpg-agent --daemon --pinentry-program /usr/bin/pinentry-qt4)
Created a file in ~/.kde/shutdown name gpg-agent.sh too and did it as executable too. The content is:
#!/bin/sh
# the second field of the GPG_AGENT_INFO variable is the
# process ID of the gpg-agent active in the current session
# so we'll just kill that, rather than all of them
[ -n "${GPG_AGENT_INFO}" ] && kill $(echo "${GPG_AGENT_INFO}" | cut -d ':' -f 2)
Created the file ~/.gnupg/gpg.conf with the content:
# GnuPG config file created by KGpg
default-key
<My key ID>keyserver-options auto-key-retrieve
use-agent
where <My key ID> is the ID of my key and I ommited.
I have pinentry-qt4 installed.
Appreciate the helps, thx.