Configure the keyring used by GPG Mail?
I would like to temporarily use an alternative keyring for encrypting / signing email.
I tried to set GNUPGHOME
on the commandline, then launch Mail.app from there (which works for GPG Keychain.app) -- but that didn't work. It continued using the default keyring in ~/.gnupg/
.
Comments are currently closed for this discussion. You can start a new one.
Keyboard shortcuts
Generic
? | Show this help |
---|---|
ESC | Blurs the current field |
Comment Form
r | Focus the comment reply box |
---|---|
^ + ↩ | Submit the comment |
You can use Command ⌘
instead of Control ^
on Mac
Support Staff 1 Posted by Luke Le on 12 Feb, 2020 08:55 PM
Hi Jonathan,
that will unfortunately not work, since Mail.app itself can't communicate with the
gpg
binary, but instead a separate XPC takes care of that, which is launched on demand, so it's not easily possible to set environment variables for that XPC.What you could try is to temporarily symlink the new GNUPGHOME to ~/.gnupg.
Hope that helps.
2 Posted by jcross on 13 Feb, 2020 12:01 PM
Okay, I'll try that.
I was a bit hesitant to mess with the
~/.gnupg
as there are various open sockets from different processes there, etc.Support Staff 3 Posted by Luke Le on 13 Feb, 2020 12:45 PM
That should not be a big problem.
Just make sure to always create a backup of
~/.gnupg
before switching it with a symlink and to stop all gpg related processes:and applications that might be using it, e.g. GPG Keychain, Mail, org.gpgtools.Libmacgpg.xpc (use
ps aux | grep -I libmacgpg\.xpc
to find its pid). If you do that, no important data should be corrupted.4 Posted by jcross on 18 Feb, 2020 07:25 PM
Thanks. That worked.
Support Staff 5 Posted by Luke Le on 18 Feb, 2020 09:19 PM
Great to hear that.
Sorry there's no easier way to do this.
Steve closed this discussion on 19 Feb, 2020 11:51 PM.
Steve re-opened this discussion on 08 Nov, 2023 04:55 PM
Steve closed this discussion on 08 Nov, 2023 04:56 PM.