what is interactive mode ?
   
    horio shoichi
     
    horio@acm.org
       
    Fri, 02 Jun 2000 20:50:06 +0900
    
    
  
horio@acm.org wrote:
> 
> I got following log entry when I tried to generate a key pair from
> a shell script.
> 
> gpg: Key generation can only be used in interactive mode
> 
> The command line the script tried to execute is
> 
> /usr/local/gnupg-1.0.1/bin/gpg --homedir /home/horio/.gg \
>         --local-user horio --options /home/horio/.gg/gg-options \
>          --logger-fd 5 --status-fd 4 --passphrase-fd 3 --comment \
>          "gpg key generated by ggen" --verbose --gen-key
> 
> except for redirections for 3, 4, 5.
> 
> The content of options file is (other than comment lines):
> 
>         allow-non-selfsigned-uid
>         always-trust
>         armor
>         batch
>         escape-from-lines
>         force-v3-sigs
>         keyserver pgp.nic.ad.jp
>         load-extension idea
>         load-extension rsa
>         lock-once
>         no-greeting
>         no-secmem-warning
>         no-tty
>         quiet
>         textmode
>         yes
> 
> However, following simple script doesn't get that complaint.
> 
> =47=byte:/opt0/horio/HOT/test/test-gpg> cat g
> /usr/local/gnupg-1.0.1/bin/gpg --homedir . \
>         --logger-fd 5 5>>log \
>         --status-fd 4 4>>stat \
>         --passphrase-fd 3 3<passphrase \
>         --text \
>         $@
> =48=byte:/opt0/horio/HOT/test/test-gpg> cd q*
> =49=byte:/opt0/horio/HOT/test/test-gpg/quack> alias g.. 'sh ../g'
> =50=byte:/opt0/horio/HOT/test/test-gpg/quack> g.. --gen-key
> gpg (GnuPG) 1.0.1; Copyright (C) 1999 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.
> 
> Reading passphrase from file descriptor 3
> Please select what kind of key you want:
>    (1) DSA and ElGamal (default)
>    (2) DSA (sign only)
>    (4) ElGamal (sign and encrypt)
> Your selection?  ^C
> gpg: Interrupt caught ... exiting
> 
> The only differences between the two scripts are the former
> 
> o  is a bit complex, and
> o  uses options file which contains --batch option.
> 
> So far, I tried following things:
> 
> o  Adding --no-batch on commnad line or removing batch from option file
>    doesn't work.
> 
> o  Removing --no-tty doesn't change much... other than passphrase fd
>    is recognized.
> 
> o  Using --interactive is complained; -i either. Presumably because
>    out of context ?
> 
> o  Trying to execute above command line copied to a file results in
>    the same complaint.
> 
> o  Removing --options phrase from the file let it go ! Amazing !
>    It seems yet more options are deemed as non-interactive.
> 
> So my question is, what is 'interactive' mode exactly ?
> 
> horio shoichi
I think I found the answer. It's yes. --no command line option reverts
it.
Isn't that too incovenient ?
horio shoichi