GPG Agent: No detach not working?

Naftuli Kay rfkrocktk at gmail.com
Mon Nov 7 19:08:15 CET 2016


I'm looking to run my gpg-agent in a SystemD user unit file like so:

[Unit]
Description=GnuPG Agent

[Service]
Type=simple
ExecStart=/usr/bin/gpg-agent --no-detach --daemon
Restart=always
RestartSec=10s

[Install]
WantedBy=multi-user.target


The problem here is that the gpg-agent detaches immediately, despite
having the --no-detach flag set. My agent is:

$ gpg-agent --version
gpg-agent (GnuPG) 2.1.11
libgcrypt 1.6.5
Copyright (C) 2016 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.

Running on Ubuntu 16.04. I'd like to have it run in the foreground so
that its output is captured by the SystemD journal so I can review.

I can get it to work if I set it to Type=forking, but I specifically
want it to run in the foreground.



More information about the Gnupg-devel mailing list