> Von: Werner Koch [mailto:w...@gnupg.org] > > On Mon, 28 Aug 2017 12:00, pe...@digitalbrains.com said: > > > The gpg process communicates its TTY to the agent so the pinentry > knows > > where to pop up. This is a feature, not a bug. But when you > deliberately > > want to pop it up elsewhere... > > If you don't want that feature the --keep-tty and --keep-display options > for gpg-agent may be useful: > > Ignore requests to change the current tty or X window system's > DISPLAY variable respectively. This is useful to lock the pinentry > to pop up at the tty or display you started the agent. > > That feature was once implemented for a user who liked to keep the > pinentry popping up in fixed screen(1) session.
Thanks for the hint. Just for reference: with all the suggestions from you and Peter, I have created following script which performs all steps as expected: tmpDir="$(mktemp -d)" screen -S GpgAgent -d -m -- gpg-agent --homedir "${GpgHomeDir}" --daemon --log-file "${tmpDir}/agent.log" --allow-loopback-pinentry --pinentry-program /usr/bin/pinentry --debug-pinentry --keep-tty --debug-all --daemon --no-detach /bin/sleep 100000 sleep 1 GpgHomeDir="${GpgHomeDir}" tmpDir="${tmpDir}" screen -S Decryptor -d -m -- /bin/bash -c 'cat decryptlist.txt | ( cd "${tmpDir}" gpgAgentPid="$(grep -E -e "^[0-9-]{10} [0-9:]{8} gpg-agent\\[[0-9]+\\] gpg-agent .* started\$" -- "${tmpDir}/agent.log" | tail -n 1 | sed -r -e "s/^.* gpg-agent\\[([0-9]+)\\] .*/\\1/")" while read -r fileName gpgPreamble; do echo "Extracting key from ${fileName}" echo "${gpgPreamble}" | base64 -d | gpgsplit (cat 000001-001.pk_enc; echo "0gsBAAAAAAAAAAAAAA==" | base64 -d) | GPG_AGENT_INFO="${GpgHomeDir}/S.gpg-agent:${gpgAgentPid}:1" gpg --use-agent --homedir "${GpgHomeDir}" --show-session-key done) 2>&1 | tee decryptlist.log' screen -R GpgAgent
smime.p7s
Description: S/MIME cryptographic signature
_______________________________________________ Gnupg-users mailing list Gnupg-users@gnupg.org http://lists.gnupg.org/mailman/listinfo/gnupg-users