initializing/unlocking key explicitely with gpg-agent

Werner Koch wk at gnupg.org
Wed Jun 11 09:58:05 CEST 2025


On Sun,  8 Jun 2025 12:57, Michael Richardson said:

> Well, that didn't quite work.  I had to re-install desktop last monday due to
> a stupid, and I have problems with multiple gpg-agents; probably gets solved
> if I finally do that first reboot now that everything is installed.

That is likley a systemd thing.  Snippet from the latest README:

  If your systems already comes with a systemd enabled GnuPG, you
  should thus tell it not to start its own GnuPG daemons by running
  the following three commands once:

    systemctl --user mask --now gpg-agent.service \
              gpg-agent.socket gpg-agent-ssh.socket \
              gpg-agent-extra.socket gpg-agent-browser.socket
    systemctl --user mask --now dirmngr.service dirmngr.socket
    systemctl --user mask --now keyboxd.service keyboxd.socket

  This way all GnuPG components can handle the startup of their
  daemons on their own and start the correct version.

If you want to run gpg-preset-passphrase you can do:

  mylibexedir="$(gpgconf -L libexecdir)"
  $mylibexecdir/gpg-preset-passphrase

It has been installed in libexec because you would not normaly run it
directly.  Changning this to bin now would be too troublesome.

If you really want to use a simple getline() passed prompt, it would be
better to write an external program.  After all you need to do the same
thing as all the pinentry versions do.  There is even a pinentry-tty
available.


Salam-Shalom,

   Werner

-- 
The pioneers of a warless world are the youth that
refuse military service.             - A. Einstein
-------------- next part --------------
A non-text attachment was scrubbed...
Name: openpgp-digital-signature.asc
Type: application/pgp-signature
Size: 247 bytes
Desc: not available
URL: <https://lists.gnupg.org/pipermail/gnupg-users/attachments/20250611/7e01cd5b/attachment.sig>


More information about the Gnupg-users mailing list