« Using OpenPGP subkeys in Mutt | Main | Apologies for the instability »

A quick mini-howto on setting up gpg-agent and mutt

There aren't many docs around for gpg-agent (due to it only being in the 1.9.x development version of gpg). I managed to get it set up today, so I thought I'd put up a mini-howto.

Installing gpg-agent. First download a 1.9.x version of the GPG sources from the gnupg ftp server . I used 1.9.10, your mileage may vary with other versions.

Install any dependencies. On my Debian Unstable box, all the dependancies were available from the unstable distribution, only gpg-1.9.x itself wasn't available.

The configure script with the 1.9.x distribution includes an option --enable-agent-only, to build the agent without building the other GPG 1.9.x components (i.e. no gpg2 or gpgsm). I did this for minimal impact on my system.

Once made and installed, add code similar to the following to your .xsession, .profile, .bash_profile files, etc.

if test -f $HOME/.gpg-agent-info && \
   kill -0 `cut -d: -f2 $HOME/.gpg-agent-info` 2>/dev/null; then
    GPG_AGENT_INFO=`cat $HOME/.gpg-agent-info`
    export GPG_AGENT_INFO
else
    eval `gpg-agent --daemon --pinentry /usr/bin/pinentry-gtk`
    echo $GPG_AGENT_INFO >$HOME/.gpg-agent-info
fi
GPG_TTY=`tty`
export GPG_TTY

Update your ~/.gnupg/gpg.conf file to include the use-agent option.

Update your ~/.muttrc to include the following line:

set pgp_use_gpg_agent

And you should be good to go... That's what it took for me, your mileage may vary :)

TrackBack

TrackBack URL for this entry:
http://blog.s8n.net/mt/mt-tb.cgi/970

Post a comment

(If you haven't left a comment here before, you may need to be approved by the site owner before your comment will appear. Until then, it won't appear on the entry. Thanks for waiting.)

About

This page contains a single entry from the blog posted on September 27, 2004 5:09 PM.

The previous post in this blog was Using OpenPGP subkeys in Mutt.

The next post in this blog is Apologies for the instability.

Many more can be found on the main index page or by looking through the archives.