gnupg on USB drive

John A. Wallace jw72253 at
Wed Oct 19 08:19:22 CEST 2011

Yes, your suggestion works nicely.  Initially, while setting it up or
testing, if a user has the USB plugged in to his own computer, there is a
possibility of utilizing the wrong set of keys and configuration settings as
a result of the environment variables or registry settings.  Is this case, I
would suggest users add this to the batch file or use it right afterwards to
confirm that the right homedir is used:

gpg --homedir u:\gnupg --version
gpg --homedir u:\gnupg --list-keys

This way they can visually see that the right set of keys will be used with
the options they have configured in u:\gnupg\gpg.conf, and not in their
regular homedir.  I also use "--interactive" mode initially.  Thanks, again.

John Wallace

-----Original Message-----
From: Werner Koch [mailto:wk at] 
Sent: Tuesday, October 18, 2011 8:40 AM
To: John A. Wallace
Cc: gnupg-doc at
Subject: Re: gnupg on USB drive

On Mon, 17 Oct 2011 20:57, jw72253 at said:

> gpg --homedir u:\gnupg
> But after hitting <enter>, the program just hangs and fails to return
> to the command prompt.  Consequently, I cannot seem to make it change

It is waiting for input.  You better add a file name and a command
option;  e.g.

  gpg --homedir u:\gnupg -er 0x12345678 file.txt

which encrypts file.txt to file.txt.gpg using the key with id 0x12345678.



Die Gedanken sind frei.  Ausnahmen regelt ein Bundesgesetz.

More information about the Gnupg-doc mailing list