start gpg-agent with systemd

Werner Koch wk at
Thu Oct 18 21:00:20 CEST 2012

On Thu, 18 Oct 2012 17:52, l.stelmach at said:

> I work on systemd integration both as a replacement for init as well as
> user session manager. I've tried to start gpg-agent as a part of user
> serssion and found it does not fit well there. Agent's default behavior
> (socket in a randomly named directory) and the information printed on
> stdout or saved in a file is hard to handle.

For quite some time now this default may be changed with a configure
option.  2.1 will make this the new default.  The rationale for this
change is that the majority of systems do not use remote mounted home
directories which won't work with local sockets.  Those installations
with these problems will anyway be controlled by sysadmins who can
change the default (with a gpg-agent.conf option).

> 1. Do you, Gnupg developers, want such a feature and will you accept
> such a patch (of course only if it meets your quality standards).

No.  If systemd does not adhere to Unix standards, it is the problem of
systemd.  GnuPG is a portable application and in no way limited to

> 2. Other systemd syservices use $XDG_RUNTIME_DIR[fn:1] to put their
> runtime stuff (sockets, flags). I'd like gpg-agent to use it too.

If that becomes part of POSIX, we can talk about it.

> 3. GPG_AGENT_INFO variable holds agent's PID. It is passed to assuan
> library function that connects to a socket but isn't used there. Is it
> going to be required in the future? Passing this information during
> parlell startup "sequence" without locking and waiting for the agent to
> start is impossible as well as during socket-activated start.

It is not used.  But, as mentioned above: The new default will be an on
demand started gpg-agent and that should solve all your problems.  In
fact we use that on Windows for many years now.



Die Gedanken sind frei.  Ausnahmen regelt ein Bundesgesetz.

More information about the Gnupg-devel mailing list