gnupg feature request

Jim C. jcllings at javahop.com
Sun Dec 7 13:18:02 CET 2003


-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

I found part of the problem but there is still a pretty big bug
somewhere.  Apparently I've been forgetting to check and make sure what
user the window belongs to before testing.  Regardless, I've still got a
problem though.

Also I would like to mention the following:

While I am using the version that comes from Nulify, with the windows
based version that is not from Nullify you get registry settings as follows:

REGEDIT4

[HKEY_LOCAL_MACHINE\Software\GNU]

[HKEY_LOCAL_MACHINE\Software\GNU\GNUPG]

[HKEY_LOCAL_MACHINE\Software\GNU\GNUPG]
"HomeDir"="C:\\GnuPG"
"gpgProgram"="C:\\GnuPG\\gpg.exe"


[HKEY_CURRENT_USER\Control Panel\Mingw32]

[HKEY_CURRENT_USER\Control Panel\Mingw32\NLS]

[HKEY_CURRENT_USER\Control Panel\Mingw32\NLS]
"MODir"="C:\\GnuPG\\Locale"

This second version came from the website Wren mentioned, i.e.
http://lists.gnupg.org/pipermail/gnupg-users/2003-December/020909.html

REGEDIT4

[HKEY_CURRENT_USER\Software\GNU]

[HKEY_CURRENT_USER\Software\GNU\GNUPG]
"HomeDir"="%APPDATA%\\GnuPG"
"gpgProgram"="C:\\PRogram Files\\GnuPG\\gpg.exe"

[HKEY_CURRENT_USER\Control Panel\Mingw32]

[HKEY_CURRENT_USER\Control Panel\Mingw32\NLS]
"MODir"="C:\\Program Files\\GnuPG\\Locale"

Why does the first version use HKEY_LOCAL_MACHINE to store HomeDir and
the second uses HKEY_CURRENT_USER.  Which is correct?  My testing shows
that deletion of [HKEY_CURRENT_USER\Software\GNU] and subsequent use of:

Windows Registry Editor Version 5.00

[HKEY_LOCAL_MACHINE\SOFTWARE\GNU\GNUPG]
"HomeDir"="C:\\Documents and Settings\\jhondoa\\Application Data\\GnuPG"
"gpgProgram"="C:\\PRogram Files\\GnuPG\\gpg.exe"

Eliminated the problem for user jhondoa:

C:\Documents and Settings\jhondoa>gpg --list-keys
C:\Documents and Settings\jhondoa\Application Data\GnuPG\pubring.gpg
- ---------------------------------------------------------------------
pub  XXXXX/XXXXXXXX 2003-12-02 Jhon D. (no password) <jhondoa at mail.com>
sub  XXXXX/XXXXXXXX 2003-12-02

Logically then, this is the correct setting and the other should be
deleted since we've gotten it to work for one (and only one) user.

So, our next task should be to alter this setting to work for all users
by inserting an environment variable, right?  When we do this we get:

Windows Registry Editor Version 5.00

[HKEY_LOCAL_MACHINE\SOFTWARE\GNU\GNUPG]
"HomeDir"="C:\\Documents and Settings\\%USERNAME%\\Application Data\\GnuPG"
"gpgProgram"="C:\\Program Files\\GnuPG\\gpg.exe"

...and this results in:

C:\Documents and Settings\jhondoa>gpg --list-keys
gpg: keyblock resource `C:\Documents and Settings\%USERNAME%\Application
Data\GnuPG\pubring.gpg': file open error

C:\Documents and Settings\jhondoa>ECHO %USERNAME%
jhondoa

Comments?  Suggestions?  Help?? :-)
Keep in mind that '--homedir "%APPDATA%"\GnuPG' works fine from the
command line. Also, my searches through the registry show that no other
Windows programs use an environment variable in the registry like this.
~ Perhaps I am going about this all wrong or perhaps it should be built
directly into the App?


Jim C.


J. Wren Hunt wrote:
| If you place the files in "Documents and
| Settings\%username-goes-here%\My Documents", or "Application Data", this
| is the way that windows will correctly handle multiple-users. Nothing
| needs to be done for GPG other then ensure that the registry setting for
| HOMEDIR is set to the correct path.
|
| Wren
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.2.3-nr1 (Windows XP)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org

iD8DBQE/05kKP09WZfjTHjIRAkhJAKCJRzfWLquHnosQQeL2PEVM0nZwxQCfa0MW
OVj0+XDJy18BEMw/2XRqjGA=
=zePT
-----END PGP SIGNATURE-----





More information about the Gnupg-users mailing list