gnupg2 packaging, how to start gnupg-agent in X11 (Re: key generation failed on card)

Bernhard Reiter bernhard at
Wed Jan 13 11:18:57 CET 2010

Am Sonntag, 3. Januar 2010 03:44:23 schrieb Stefan Xenon:
> I found the cause for this problem by myself: gpg-agent was not running.
> As mentioned before it seems that I have to start gpg-agent manually
> each time. 

If you were logged in via an X11 session, this sounds like an Ubuntu 
packaging issue.

> Therefore I use the following solution:

We (as in Kolab-Konsortium) use the following solution for Debian packages
(which we also submit upstream):

Maintainer: Kolab-Konsortium Packager <packaging at>
Source: gnupg2
Version: 2.0.13-0kk1

dpkg -L gnupg-agent | grep session

Our packages (no promisses) can be found here:
For development purposes we also run a continous build system for some
gnupg packages at

> Am 31.12.2009 20:29, schrieb Stefan Xenon:
> > I compiled GnuPG 2.0.14 on Ubuntu 9.10 (using libgcrypt 1.4.4). When
> > generating a key on an OpenPGP card v2 it fails right after entering
> > "generate" and tells me "IPC Schreibfehler" (IPC write error).

: ${GNUPGHOME=$HOME/.gnupg}


if test -x $GPGAGENT &&
   { test -z "$GPG_AGENT_INFO" || ! $GPGAGENT 2>/dev/null; }; then

   if [ -r "$PID_FILE" ]; then
       . "$PID_FILE"

   # Invoking gpg-agent with no arguments exits successfully if the agent
   # is already running as pointed by $GPG_AGENT_INFO
   if ! $GPGAGENT 2>/dev/null; then
       STARTUP="$GPGAGENT --daemon --sh --write-env-file=$PID_FILE $STARTUP"
-: Datei oder Verzeichnis nicht gefunden

Managing Director - Owner:       (Free Software Company)
Germany Coordinator: Coordinator:
Intevation GmbH, Osnabrück, DE; Amtsgericht Osnabrück, HRB 18998
Geschäftsführer Frank Koormann, Bernhard Reiter, Dr. Jan-Oliver Wagner
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 198 bytes
Desc: This is a digitally signed message part.
URL: </pipermail/attachments/20100113/0f1aefc9/attachment.pgp>

More information about the Gnupg-devel mailing list