First recommend to use the saint
]$ man gpg-agent
You will learn that gpg-agent should be started rather as daemon and only as a single pid. If you start looking the daemon start-up procedure inside your system of course, you won't find it (I didn't and it was Fedora 10). Well, First what I decided to do was to fallow the manual, so I did:
]$ vi $HOME/.bashrc
and added following lines into it:
# GPG-AGENT stuff
Yes, you don't have the "gpg-agent-start.sh" file yet and there is no word about it in man! Here it is:
# Decide wether to start gpg-agent daemon.
# Create necessary symbolic link in $HOME/.gnupg/S.gpg-agent
if [ "$RETVAL" -eq 1 ]; then
echo "Starting gpg-agent daemon."
eval `gpg-agent --daemon `
echo "Daemon gpg-agent already running."
# Nasty way to find gpg-agent's socket file...
GPG_SOCKET_FILE=`find /tmp/gpg-* -name $SOCKET`
echo "Updating socket file link."
cp -fs $GPG_SOCKET_FILE $HOME/.gnupg/S.gpg-agent
I'm not quite sure if there is a better way to quickly, find a place of a socket file. In my system it is placed randomly in /tmp/gpg-xxxxxxx/S.gpg-agent, where xxxxxxx are random characters.
If anyone know it please write it down...