Relative path in GPG.conf

John Clizbe John at
Sun Jul 4 20:04:43 CEST 2010

Csabi wrote:
> Can somebody help me?
> I have Windows XP.
> I just installed the newest Thunderbird Portable 3.0.1 and GPG for
> Thunderbird Portable 1.4.10 and the EnigMail Extension to my USB drive.
> The Gpg.exe in the GPG for Thunderbird Portable 1.4.10 is always search
> my keyrings in the default location: c:\Documents and
> Settings\myusername\Application Data\GnuPG
> I would like to create a gpg.conf file with a relative path and put it
> near the Gpg.exe on to the portable drive.
> I want to copy my keyrings to a portable drive and want to set the
> relative path to find my keyrings.  How can i do this?

1) If there is a .BAT file starting Portable Thunderbird, insert a line before
Thunderbird starts:

SET GNUPGHOME=<location of gpg.conf>

2) Alternately from Thunderbird's main menu, Select OpenPGP, then Preferences.
Click 'Display Expert Settings'. You may need to click OK and re-open the
Preferences panel.  Click the Advanced tab at the top of the Preferences panel.
In the text box, 'Additional parameters for GnuPG', enter

    --homedir <location of gpg.conf>

Click OK to save.

Copy/move your keyring files: pubring.gpg, secring.gpg, trustdb.gpg, to the same
directory you used in either of the above. The next time Thunderbird starts, gpg
called from Enigmail will find your keyring files and any gpg.conf you create.

There is a third possibility which involves editing a registry value, but that
really isn't very portable. :)

Much more Enigmail-specific help is available at or
by sending email to

John P. Clizbe                      Inet:John (a)
You can't spell fiasco without SCO. hkp://  or
     mailto:pgp-public-keys at

Q:"Just how do the residents of Haiku, Hawai'i hold conversations?"
A:"An odd melody / island voices on the winds / surplus of vowels"

More information about the Gnupg-users mailing list