Alternative .gnupg storage

bram's Avatar

bram

11 Aug, 2020 09:30 AM

This is more like a request.

I have my GnuPG config files in accordance with $XDG_CONFIG_HOME, which means they reside in ~/.config/gnupg instead of ~/.gnupg.

I was wondering if there is a way to make GPGTools look at ~/.config/gnupg to retrieve the keys, for instance by setting it in the preferences.

  1. Support Staff 1 Posted by Luke Le on 11 Aug, 2020 09:20 PM

    Luke Le's Avatar

    Hi Bram,

    while technically you could set GNUPG_HOME in your .bash_profile that would only work for Terminal commands, but most likely not be respected by our apps.

    The best option is to create a symlink (make sure that neither Mail nor GPG Keychain are running):

    killall gpg-agent gpg dirmngr scdaemon
    mv ~/.gnupg ~/.gnupg-old
    ln -s ~/.config/gnupg .gnupg
    

    After that everything should work as expected.

    Hope that helps.

  2. 2 Posted by bram on 12 Aug, 2020 02:59 AM

    bram's Avatar

    Thanks Luke! That did the trick. I had created a simlink, but I hadn't killed the processes that use gpg.

  3. Support Staff 3 Posted by Luke Le on 12 Aug, 2020 07:39 AM

    Luke Le's Avatar

    Great to hear! Yeah that is crucial since GnuPG tries always creates a .gnupg if it doesn't exist, so if you don't kill all related processes it might create a .gnupg folder by mistake or not pick up on the symlinked one.

    Closing this ticket. Feel free to open a new one at any time should you have questions or run into problems.

  4. Luke Le closed this discussion on 12 Aug, 2020 07:39 AM.

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