From: W. Trevor King Date: Sat, 21 Apr 2012 17:42:47 +0000 (-0400) Subject: Update ttyname portion of gpg-agent post and link to my gpg-agent-* scripts. X-Git-Url: http://git.tremily.us/?a=commitdiff_plain;h=ace000d4b3b7cadaf0a96b4482edcf3d9d9912f9;p=blog.git Update ttyname portion of gpg-agent post and link to my gpg-agent-* scripts. --- diff --git a/posts/gpg-agent.mdwn b/posts/gpg-agent.mdwn index 53d2d8b..940730b 100644 --- a/posts/gpg-agent.mdwn +++ b/posts/gpg-agent.mdwn @@ -11,12 +11,10 @@ dotfiles maintenance): Start the agent with - $ GPG_TTY=$(tty) - $ gpg-agent --daemon --write-env-file "${HOME}/.gnupg/agent-info" - $ echo "GPG_TTY='${GPG_TTY}'; export GPG_TTY" >> "${HOME}/.gnupg/agent-info" + $ gpg-agent --daemon --display "${DISPLAY}" --ttyname $(TTY) --keep-tty --keep-display --write-env-file "${HOME}/.gnupg/agent-info" $ source "${HOME}/.gnupg/agent-info" -The `GPG_TTY` bit will spawn the `pinentry` call in the designated +The `ttyname` bit will spawn the `pinentry` call in the designated TTY. This avoids troublesome issues like pinentry clobbering [[Mutt]] if they are both using ncurses. @@ -28,6 +26,10 @@ When you are done with the agent, kill it with $ killall gpg-agent $ rm -f "${HOME}/.gnupg/agent-info" +Since these commands are tedious to remember and type, I've wrapped +them in little scripts: [[gpg-agent-spawn.sh]] and +[[gpg-agent-kill.sh]]. + [gpg-agent]: http://www.gnupg.org/documentation/manuals/gnupg/Invoking-GPG_002dAGENT.html [[!tag tags/linux]]