When I logon to Gnome, there is no gpg-agent running. When I compose and try to encrypt an emai lwith tunderbird+enigmail, i'll get following error ([...] left out): Initializing Enigmail service ... EnigmailAgentPath=/usr/bin/gpg enigmail> /usr/bin/gpg --version --version --batch --no-tty --charset utf8 gpg (GnuPG) 2.0.11 libgcrypt 1.4.4 Copyright (C) 2009 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 Supported algorithms: Pubkey: RSA, ELG, DSA Cipher: 3DES, CAST5, BLOWFISH, AES, AES192, AES256, TWOFISH Hash: MD5, SHA1, RIPEMD160, SHA256, SHA384, SHA512, SHA224 Compression: Uncompressed, ZIP, ZLIB, BZIP2 enigmail> /usr/bin/gpg-connect-agent enigmail> /usr/bin/gpg-agent --sh --write-env-file '/home/michael/.gnupg/.gpg-ag ent-info' --daemon --default-cache-ttl 300 --max-cache-ttl 999999 enigmail> /usr/bin/gpg --charset utf8 --verbose --batch --no-tty --status-fd 2 - -comment 'Using GnuPG with Mozilla - http://enigmail.mozdev.org' -t --clearsign -u [...] --use-agent gpg: problem with the agent: No pinentry gpg: skipped "[...]": General error gpg: [stdin]: clearsign failed: General error enigmail.js: Enigmail.encryptMessageEnd: Error in command execution enigmail.js: Enigmail.encryptMessage: Error in command execution After this step, there is a running gpg-agent with following /proc/.../environ DISPLAY=:0.0HOME=/home/michaelLANG=en_US.UTF-8LC_ALL=en_US.UTF-8LOGNAME=michaelLD_LIBRARY_PATH=/usr/lib64/mozilla-thunderbird:/usr/lib64/mozilla-thunderbird/pluginsMOZILLA_FIVE_HOME=/usr/lib64/mozilla-thunderbirdPATH=/usr/bin:/bin:/usr/local/sbin:/usr/local/bin:/usr/games/bin:/usr/sbin:/usr/bin:/sbin:/bin:/opt/bin:/usr/x86_64-pc-linux-gnu/gcc-bin/4.3.3:/usr/kde/3.5/sbin:/usr/kde/3.5/bin:/usr/qt/3/bin:/usr/GNUstep/System/Tools:/usr/GNUstep/Local/ToolsPWD=/home/michaelSHELL=/bin/bashUSER=michaelGPG_AGENT_INFO=/tmp/gpg-QRBFgK/S.gpg-agent:1659:1 thunderbird-bin's environ is btw MANPATH=/etc/java-config-2/current-system-vm/man:/usr/local/share/man:/usr/share/man:/usr/share/binutils-data/x86_64-pc-linux-gnu/2.18/man:/usr/share/gcc-data/x86_64-pc-linux-gnu/4.3.3/man:/etc/java-config/system-vm/man/:/usr/kde/3.5/share/man:/usr/qt/3/doc/man:/opt/opera/share/man:/usr/GNUstep/System/Library/Documentation/man:/usr/GNUstep/Local/Library/Documentation/manINFODIR=/usr/GNUstep/System/Library/Documentation/info:/usr/GNUstep/Local/Library/Documentation/infoORBIT_SOCKETDIR=/tmp/orbit-michaelMOZ_PIS_SESSION_PID=2047MOZILLA_LIBDIR=/usr/lib64/mozilla-thunderbirdXDG_MENU_PREFIX=gnome-SHELL=/bin/bashXDG_SESSION_COOKIE=fc343f79f4bde513b84b919b49987300-1248829779.205860-884148736GTK_RC_FILES=/etc/gtk/gtkrc:/home/michael/.gtkrc-1.2-gnome2MOZ_PIS_MOZBINDIR=QTDIR=/usr/qt/3MOZILLA_FIVE_HOME=/usr/lib64/mozilla-thunderbirdLC_ALL=en_US.UTF-8ANT_HOME=/usr/share/antHISTFILESIZE=10000000USER=michaelLD_LIBRARY_PATH=/usr/lib64/mozilla-thunderbird:/usr/lib64/mozilla-thunderbird/pluginsPRELINK_PATH_MASK=/usr/lib64/klibcGDK_USE_XFT=1SSH_AUTH_SOCK=/tmp/keyring-Tk7Hwl/socket.sshGNOME_KEYRING_SOCKET=/tmp/keyring-Tk7Hwl/socketPYTHONDOCS=/usr/share/doc/python-docs-2.5.4/html/libUT_DATA_PATH=/opt/unreal-tournament/System/USERNAME=michaelSESSION_MANAGER=local/io:/tmp/.ICE-unix/1857PAGER=/usr/bin/lessCONFIG_PROTECT_MASK=/etc/gentoo-release /etc/sandbox.d /etc/env.d/java/ /etc/udev/rules.d /etc/fonts/fonts.conf /etc/gconf /etc/terminfo /etc/ca-certificates.conf /etc/texmf/web2c /etc/texmf/language.dat.d /etc/texmf/language.def.d /etc/texmf/updmap.d /etc/revdep-rebuildMOZ_PIS_API=2MOZ_PLUGIN_PATH=/usr/lib64/nsbrowser/pluginsXDG_CONFIG_DIRS=/etc/xdgFLTK_DOCDIR=/usr/share/doc/fltk-1.1.7-r2/htmlDESKTOP_SESSION=gnomePATH=/usr/bin:/bin:/usr/local/sbin:/usr/local/bin:/usr/games/bin:/usr/sbin:/usr/bin:/sbin:/bin:/opt/bin:/usr/x86_64-pc-linux-gnu/gcc-bin/4.3.3:/usr/kde/3.5/sbin:/usr/kde/3.5/bin:/usr/qt/3/bin:/usr/GNUstep/System/Tools:/usr/GNUstep/Local/ToolsDISTCC_LOG=PWD=/home/michaelJAVA_HOME=/etc/java-config-2/current-system-vmJAVAC=/etc/java-config-2/current-system-vm/bin/javacEDITOR=/usr/bin/vimGDM_KEYBOARD_LAYOUT=us_deGNOME_KEYRING_PID=1843LANG=en_US.UTF-8GDM_LANG=en_US.UTF-8QMAKESPEC=linux-g++DISTCC_VERBOSE=DCCC_PATH=/usr/lib64/distcc/binHISTIGNORE=*pass*GDMSESSION=gnomeTEXINPUTS=/usr/lib64/ocaml/ocamldoc:JDK_HOME=/etc/java-config-2/current-system-vmSHLVL=1HOME=/home/michaelJAVACC_HOME=/usr/share/javacc/GNOME_DESKTOP_SESSION_ID=this-is-deprecatedLESS=-R -M --shift 5LOGNAME=michaelGCC_SPECS=CVS_RSH=sshDBUS_SESSION_BUS_ADDRESS=unix:abstract=/tmp/dbus-tgFnRxwiEL,guid=3856ea6aac48ee51350e18c74a6fa153XDG_DATA_DIRS=/usr/local/share:/usr/kde/3.5/share:/usr/share:/usr/share/gdmPKG_CONFIG_PATH=/usr/qt/3/lib64/pkgconfigLESSOPEN=|lesspipe.sh %sINFOPATH=/usr/share/info:/usr/share/binutils-data/x86_64-pc-linux-gnu/2.18/info:/usr/share/gcc-data/x86_64-pc-linux-gnu/4.3.3/info:/usr/share/info/emacs-22:/usr/GNUstep/System/Library/Documentation/info:/usr/GNUstep/Local/Library/Documentation/infoDISPLAY=:0.0OPENGL_PROFILE=xorg-x11CONFIG_PROTECT=/var/lib/hsqldb /usr/kde/3.5/share/config /usr/kde/3.5/env /usr/kde/3.5/shutdown /usr/share/configMOZ_PIS_USER_DIR=.thunderbirdXAUTHORITY=/var/run/gdm/auth-for-michael-fxrcru/database_=/usr/lib64/mozilla-thunderbird/thunderbird-bi I've to killall gpg-agent and start /usr/bin/gpg-agent --sh --write-env-file /home/michael/.gnupg/.gpg-agent-info --daemon --default-cache-ttl 300 --max-cache-ttl 999999 generating GPG_AGENT_INFO=/tmp/gpg-KrMvKi/S.gpg-agent:2186:1; export GPG_AGENT_INFO out of the gnome-terminal/run dialog. Optional: a new send attempt w/o restarting thunderbird results in (interesting: cannot connect to X server :0.0) enigmail> /usr/bin/gpg --charset utf8 --verbose --batch --no-tty --status-fd 2 - -comment 'Using GnuPG with Mozilla - http://enigmail.mozdev.org' -t --clearsign -u [...] --use-agent can't connect to `/tmp/gpg-VDctWy/S.gpg-agent': No such file or directory gpg: can't connect to the agent - trying fall back can't connect to `/home/michael/.gnupg/S.gpg-agent': No such file or directory gpg: no running gpg-agent - starting one No protocol specified pinentry-qt: cannot connect to X server :0.0 gpg-agent[2175]: can't connect server: ec=4.16383 gpg-agent[2175]: can't connect to the PIN entry module: End of file gpg-agent[2175]: command get_passphrase failed: No pinentry gpg: problem with the agent: No pinentry gpg: skipped "[...]": General error gpg: [stdin]: clearsign failed: General error enigmail.js: Enigmail.encryptMessageEnd: Error in command execution enigmail.js: Enigmail.encryptMessage: Error in command execution After restartig thunderbird and successfull sending the email I've Initializing Enigmail service ... EnigmailAgentPath=/usr/bin/gpg enigmail> /usr/bin/gpg --version --version --batch --no-tty --charset utf8 gpg (GnuPG) 2.0.11 libgcrypt 1.4.4 Copyright (C) 2009 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 Supported algorithms: Pubkey: RSA, ELG, DSA Cipher: 3DES, CAST5, BLOWFISH, AES, AES192, AES256, TWOFISH Hash: MD5, SHA1, RIPEMD160, SHA256, SHA384, SHA512, SHA224 Compression: Uncompressed, ZIP, ZLIB, BZIP2 enigmail> /usr/bin/gpg-connect-agent enigmail> /usr/bin/gpg --charset utf8 --verbose --batch --no-tty --status-fd 2 - -comment 'Using GnuPG with Mozilla - http://enigmail.mozdev.org' -t --clearsign -u 0xDA51DCD6 --use-agent gpg: writing to stdout gpg: DSA/SHA1 signature from: "DA51DCD6 Michael Weber <webermi@cip.ifi.lmu.de>" in the enigmail console. When I logon to gnome and start gpg-agent out of the console and then thunderbird, it works, too. Reproducible: Always Steps to Reproduce: 1. logon to X11/Gnome (maybe reboot or kill old sessions' instances of gpg-agent) 2. start thunderbird via application launcher or start menu 3. try to send an encrypted email Actual Results: No Pinentry / maybe X11 Display Access error. Expected Results: encrypt and send the mail. io ~ # emerge --info Portage 2.1.6.13 (default/linux/amd64/2008.0, gcc-4.3.3, glibc-2.10.1-r0, 2.6.30-gentoo-r4 x86_64) ================================================================= System uname: Linux-2.6.30-gentoo-r4-x86_64-Intel-R-_Core-TM-2_Duo_CPU_T7300_@_2.00GHz-with-glibc2.2.5 Timestamp of tree: Mon, 27 Jul 2009 22:30:01 +0000 distcc 3.1 x86_64-pc-linux-gnu [enabled] ccache version 2.4 [enabled] app-shells/bash: 3.2_p39 dev-java/java-config: 2.1.8-r1 dev-lang/python: 2.5.4-r3 dev-util/ccache: 2.4-r7 dev-util/cmake: 2.6.4 sys-apps/baselayout: 2.0.0 sys-apps/openrc: 0.4.3-r3 sys-apps/sandbox: 1.6-r2 sys-devel/autoconf: 2.13, 2.63-r1 sys-devel/automake: 1.8.5-r3, 1.9.6-r2, 1.10.2 sys-devel/binutils: 2.18-r3 sys-devel/gcc-config: 1.4.1 sys-devel/libtool: 2.2.6a virtual/os-headers: 2.6.30-r1 ACCEPT_KEYWORDS="amd64" CBUILD="x86_64-pc-linux-gnu" CFLAGS="-march=core2 -mfpmath=sse -mieee-fp -O2 -pipe" CHOST="x86_64-pc-linux-gnu" CONFIG_PROTECT="/etc /usr/kde/3.5/env /usr/kde/3.5/share/config /usr/kde/3.5/shutdown /usr/share/config /var/lib/hsqldb" CONFIG_PROTECT_MASK="/etc/ca-certificates.conf /etc/env.d /etc/env.d/java/ /etc/fonts/fonts.conf /etc/gconf /etc/gentoo-release /etc/revdep-rebuild /etc/sandbox.d /etc/terminfo /etc/texmf/language.dat.d /etc/texmf/language.def.d /etc/texmf/updmap.d /etc/texmf/web2c /etc/udev/rules.d" CXXFLAGS="-march=core2 -mfpmath=sse -mieee-fp -O2 -pipe" DISTDIR="/usr/portage/distfiles" EMERGE_DEFAULT_OPTS="--jobs 2 --keep-going" FEATURES="ccache distcc distlocks fixpackages parallel-fetch protect-owned sandbox sfperms strict unmerge-orphans userfetch" GENTOO_MIRRORS="http://nash.fs.lmu.de/gentoo/" LANG="en_US.UTF-8" LC_ALL="en_US.UTF-8" LDFLAGS="-Wl,-O1" LINGUAS="de en" MAKEOPTS="-j50" PKGDIR="/usr/portage/packages" PORTAGE_CONFIGROOT="/" PORTAGE_RSYNC_OPTS="--recursive --links --safe-links --perms --times --compress --force --whole-file --delete --stats --timeout=180 --exclude=/distfiles --exclude=/local --exclude=/packages --ipv6" PORTAGE_TMPDIR="/var/tmp" PORTDIR="/usr/portage" PORTDIR_OVERLAY="/usr/local/portage/layman/sunrise /usr/local/portage/layman/wschlich-testing /usr/local/portage/layman/gnome /usr/local/portage/layman/xmw /usr/local/portage/layman/x11 /usr/local/portage" SYNC="rsync://http://nash.fs.lmu.de//gentoo-portage" USE="X a54 aac aalib acl acpi alsa amd64 bash-completion berkdb bluetooth bzip2 cairo cddb cdparanoia cli consolekit cracklib crypt cups dbus dga directfb djvu doc dri dts dv dvb dvd dvdr dvdread encode exif fbcon ffmpeg fftw flac fontconfig fortran gdbm gif gimp glut gnome gnome-keyring gnutls gphoto2 gpm gs gtk hal iconv imagemagick ipod ipv6 isdnlog java java6 jbig joystick jpeg jpeg2k lame latex lcms libsamplerate lm_sensors lzma lzo mad midi mikmod mmap mmx mng mp3 mpeg mplayer mudflap multilib mysql ncurses nls nptl nptlonly nsplugin ogg openal openexr opengl openmp pam pch pcmcia pcre pdf perl png postgres pppd python qt3 qt4 quicktime raw readline reflection rle samba sdl session smp speex spell spl sqlite sse sse2 ssl svg symlink sysfs syslog tcl tcpd theora threads tiff tk truetype unicode usb vim-syntax vorbis wavpack x264 xcb xine xinerama xml xorg xscreensaver xulrunner xv xvid zlib" ALSA_CARDS="intel-hda" ALSA_PCM_PLUGINS="adpcm alaw asym copy dmix dshare dsnoop empty extplug file hooks iec958 ioplug ladspa lfloat linear meter mmap_emul mulaw multi null plug rate route share shm softvol" APACHE2_MODULES="actions alias auth_basic authn_alias authn_anon authn_dbm authn_default authn_file authz_dbm authz_default authz_groupfile authz_host authz_owner authz_user autoindex cache dav dav_fs dav_lock deflate dir disk_cache env expires ext_filter file_cache filter headers include info log_config logio mem_cache mime mime_magic negotiation rewrite setenvif speling status unique_id userdir usertrack vhost_alias" ELIBC="glibc" INPUT_DEVICES="evdev" KERNEL="linux" LCD_DEVICES="bayrad cfontz cfontz633 glk hd44780 lb216 lcdm001 mtxorb ncurses text" LINGUAS="de en" USERLAND="GNU" VIDEO_CARDS="intel" Unset: CPPFLAGS, CTARGET, FFLAGS, INSTALL_MASK, PORTAGE_COMPRESS, PORTAGE_COMPRESS_FLAGS, PORTAGE_RSYNC_EXTRA_OPTS
Looks like something that is supposed to start gpg-agent does not start it at gnome login. Am I correct in reading that this bug does not occur when gpg-agent is started manually?
I've forgot to state, that my ~/.gnupg/gpg-agent.conf contains pinentry-program /usr/bin/pinentry-qt pinentry-gtk-2 doesn't change anything. I get aseked for the passphrase by this pinentry-qt. Sourcing ~/.gnupg/.gpg-agent-info and exporting GPG_AGENT_INFO into the thunderbird start environment (gnome-terminal with bash) doesn't change anything. One of my questions is: Should there be a gpg-agent started by the gnome startup? Thanks a lot.
(In reply to comment #1) > Looks like something that is supposed to start gpg-agent does not start it at > gnome login. That's the point I've just added. > Am I correct in reading that this bug does not occur when > gpg-agent is started manually? Yes, manually out of the X11 enabled console (gnome-terminal) works. The gpg-agent startup out of the console started thunderbird results in the failure.
Ok, thanks for the quick response, I'm going to assign this bug to the gnome herd who should be able to help you better then I can :).
this is clearly not a gnome problem but I'll try to see if I can help anyway. How does gpg-agent gets started on login ? Do you use keychain ? If you want to start any agent, it is better to throw a script for them in /etc/X11/xinit/xinitrc.d, see how dbus does it or how gdm installs a keychain and ssh-agent file there.
Created attachment 199613 [details] possible xinitrc.d start script for gpg-agent I think this should be included in the app-crypt/gnupg-2.0.11 package, maybe depending on the X use flag.
Oops, there is a certain similarity to http://bugs.gentoo.org/show_bug.cgi?id=258944; *** This bug has been marked as a duplicate of bug 258944 ***