Changing Home Directory of GPG

John Clizbe JPClizbe at comcast.net
Sat Mar 19 05:56:53 CET 2005


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

Servie Platon wrote:
> Hi GPG gurus,
> 
> After I have downloaded and installed the latest gpg
> binary for windows, when I did the command below:
> 
> C:\Documents and Settings\servie>gpg --version
> gpg (GnuPG) 1.4.1
> Copyright (C) 2005 Free Software Foundation, Inc.
> This program comes with ABSOLUTELY NO WARRANTY.
> This is free software, and you are welcome to
> redistribute it
> under certain conditions. See the file COPYING for
> details.
> 
> Home: C:/GnuPG
> Supported algorithms:
> Pubkey: RSA, RSA-E, RSA-S, ELG-E, DSA
> Cipher: 3DES, CAST5, BLOWFISH, AES, AES192, AES256,
> TWOFISH
> Hash: MD5, SHA1, RIPEMD160, SHA256, SHA384, SHA512
> Compression: Uncompressed, ZIP, ZLIB, BZIP2
> 
> For Windows XP, should the keyrings be stored in
> C:/Document and Settings/servie/Application
> Data/GnuPG\pubring.gpg?
> 
> But my output is went like this:
> 
> C:\Documents and Settings\servie>gpg --list-key
> C:/GnuPG\pubring.gpg
> --------------------
> pub   1024D/1AEC5F92 2005-03-19
> uid                  Serviliano S. Platon
> <servie at admar-group.com>
> sub   2048g/50A8D61A 2005-03-19
> 
> Are there steps that I may have missed out? Or are
> these norm? Please kindly guide me through.

The installer didn't change the registry key for GnuPG's HomeDir.

Here's the upgrade step-by-step: (I posted this earlier in the week on
PGP-Basics). This assumes you had everything in C:\GnuPG.

0) Keep C:\GnuPG as your backup.

1) Download and run installer.

  ftp://ftp.gnupg.org/GnuPG/binary/gnupg-w32cli-1.4.1.exe (1406k)
  ftp://ftp.gnupg.org/GnuPG/binary/gnupg-w32cli-1.4.1.exe.sig

2) Copy keyrings and option preferences. Open a CMD window

	cd C:\GnuPG
	copy *.gpg "%APPDATA%\GnuPG"
	copy gpg.conf "%APPDATA%\GnuPG"
	exit

4) Fix PATH if necessary. Right-click My Computer; select Properties.
(same as Control Panel ->System). Win2k/XP: Advanced tab -> Environment
Variables. Locate Path among the environment variables and click 'Edit'.
If GnuPG was in the path before, change the location to the new location
(default is C:\Program Files\Gnu\GnuPG). If not present, add it to the
beginning of the string. 'Program Files' may usually be abbreviated
'Progra~1' if you're tight on room. Click OK three times to close the
System Properties dialog.

5) Update Registry values:
a) Using Regedit.exe
   Open the registry and expand HKEY_CURRENT_USER, then Software,
   Gnu and finally GnuPG. In the right-hand panel, double click "HomeDir"
   and change its value to reflect the new Home directory:
	"C:\Documents and Settings\servie\Application Data\GnuPG"
   This is the only change required for GnuPG. If you are also using
   or have used GPGrelay, GPGshell, or WinPT, you may have two additional
   values to change:
     gpgProgram = "C:\Program Files\Gnu\GnuPG\gpg.exe"
	   or	  "C:\PROGRA~1\Gnu\GnuPG\gpg.exe"

     OptFile =
	"C:\Documents and Settings\servie\Application Data\GnuPG\gpg.conf"

   You don't include the quotes (") when entering the values in the
   text boxes. Ignore any other values under this key. Exit RegEdit.
   go to Step 6.

b) Using a Registry patch file. We cover this in great detail on the
Enigmail GnuPG for Windows page (http://enigmail.mozdev.org/gpgconf.html).
Briefly you need to use notepad to construct a file containing your new
values and save it with a .REG extension. Close Notepad and double-click
the new .REG file in Explorer - answer Yes/OK to include the file into the
Registry.  Your file should look like (just the stuff between the "++++"
lines):
++++
REGEDIT4

[HKEY_CURRENT_USER\Software\GNU]

[HKEY_CURRENT_USER\Software\GNU\GNUPG]

[HKEY_CURRENT_USER\Software\GNU\GNUPG]
"HomeDir"="C:\\Documents and Settings\\user\\Application Data\\GnuPG"
"gpgProgram"="C:\\Program Files\\Gnu\\GnuPG\\gpg.exe"
"OptFile"="C:\\Documents and Settings\\user\\Application
Data\\GnuPG\\gpg.conf"

++++
Change 'user' in the abouve to your user name (servie). The OptFile line
should be all on one line - the email probably wrapped.

6) Test installation. Open a new CMD window, 'gpg --version' should show
something similar to:

C:\WINNT>gpg --version
gpg (GnuPG) 1.4.1
Copyright (C) 2005 Free Software Foundation, Inc.
This program comes with ABSOLUTELY NO WARRANTY.
This is free software, and you are welcome to redistribute it
under certain conditions. See the file COPYING for details.

Home: C:/Documents and Settings/jpclizbe/Application Data/GnuPG
Supported algorithms:
Pubkey: RSA, RSA-E, RSA-S, ELG-E, DSA
Cipher: IDEA, 3DES, CAST5, BLOWFISH, AES, AES192, AES256, TWOFISH
Hash: MD5, SHA1, RIPEMD160, SHA256, SHA384, SHA512
Compression: Uncompressed, ZIP, ZLIB, BZIP2

C:\WINNT>

The version should be 1.4.1 and Home should be like the above but with
your username, not mine.

That's all there is to it.

- From your post it sounds like the only steps remaining would e to copy the
keyring *.gpg and options (gpg.conf) files from C:\GnuPG and update the
Registry values.

- --
John P. Clizbe                   Inet:   JPClizbe(a)comcast DOT nyet
Golden Bear Networks             PGP/GPG KeyID: 0x608D2A10
"Be who you are and say what you feel because those who mind don't matter
and those who matter don't mind." - Dr Seuss, "Oh the Places You'll Go"
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.1 (MingW32)
Comment: When cryptography is outlawed, b25seSBvdXRsYXdzIHdpbGwgdXNlIG
Comment: Be part of the £33t ECHELON -- Use Strong Encryption.
Comment: It's YOUR right - for the time being.
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org

iD8DBQFCO7EUHQSsSmCNKhARAg7AAJ413IlYR36DqI1r0uQilBH3Vq9wBgCeJq58
x9rMZbnUFWiRrbApy/tnS6U=
=fZa4
-----END PGP SIGNATURE-----



More information about the Gnupg-users mailing list