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
Comments are currently closed for this discussion. You can start a new one.
|?||Show this help|
|ESC||Blurs the current field|
|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
that will unfortunately not work, since Mail.app itself can't communicate with the
gpgbinary, 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
~/.gnupgas 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
~/.gnupgbefore 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\.xpcto 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.