path defaults for gpg.conf
John
jw72253 at verizon.net
Fri Feb 1 06:39:57 CET 2013
> Hi John,
>
> some of your questions might be answered by reading README.W32 which you
> can
> find in the doc folder of GnuPG source tarballs:
>
> | GnuPG makes use of a per user home directory to store its keys as well
> as
> | configuration files. The default home directory is a directory named
> "gnupg"
> | below the application data directory of the user. This directory will be
> | created if it does not exist. Being only a default, it may be changed by
> | setting the name of the home directory into the Registry under the key
> | HKEY_CURRENT_USER\Software\GNU\GnuPG using the name "HomeDir". If an
> | environment variable "GNUPGHOME" exists, this even overrides the
> registry
> | setting. The command line option "--homedir" may be used to override all
> | other settings of the home directory.
>
> Olav
Hello, Olav.
Thanks for the information and for the pointer to the "readme.w32". It
clarified my understanding. Based on these sources and what you said above,
it would seem that there are four places where a "gpg.conf" file should be
referenced and that there is an order in priority used by "gpg.exe" for
referencing it. As I understand it, and please correct me if I am wrong, in
order of increasing priority, the gpg user's homedir, where "gpg.conf"
should be placed, would be as follows.
First, if no option is stated for it, the program would look by default in
"a directory named 'gnupg' below the application data directory of the
user." In Windows 7, that is here: %APPDATA%\gnupg. Second, any
arbitrarily chosen folder for the user home directory can be specified if
its name is put in Windows Registry entry "under the key
HKEY_CURRENT_USER\Software\GNU\GnuPG using the name 'HomeDir'." Third, one
can use an environment variable named "GNUPGHOME" to specify an arbitrarily
chose directory for it. Fourth, the on-the-fly option of "--homedir" at the
actual time when the command is issued can used to identify the position of
a gpg.conf in the user's home directory. Is that about right, then?
I am not a programmer, but only a mere power-user (on a good day anyway!),
so I will step outside my usual comfort zone for a moment to say that I am
inclined to think that there is one more place where "gpg.conf" can be put
and made use of effectively in a Windows directory, namely, the current
directory of the executable "gpg.exe" at the time the command is issued.
That is to say, if none of the previously noted methods point to the folder
where "gpg.conf" were located, would it not be true that gpg.exe would
finally look in its own current directory, which should suffice consequently
for this purpose?
John A. Wallace
The pen is mightier than the sword, but only if you get in the first stroke.
More information about the Gnupg-users
mailing list