The ssh envelope
first off, you may find the build scripts on SlackBuilds, but I've also got them posted in my downloads area. and then you can get the source from http://www.jmknoble.net/software/x11-ssh-askpass/x11-ssh-askpass-1.2.4.1.tar.gz.
the ssh-add command looks to see if SSH_ASKPASS or DISPLAY is set, and if you at a terminal of not, so this is not much more than providing it this info at the right time. and then calling the command.
the right time for this is before your window manager launches, so your entire X session is enveloped. ;)
and the $HOME/.xprofile file is sourced by kdm, before it exec's the window manager, $session.
so add this file if you don't already have it, or just add to it, the following blob in to it.
OR download this xprofile and save it as ~/.xprofile
usessh="yes"
if test "$usessh" = "yes" -a -d $HOME/.ssh ; then
SSH_ASKPASS="/usr/libexec/x11-ssh-askpass"
if [ -x $SSH_ASKPASS ] ; then
ssh-agent > $HOME/.ssh/agent
. $HOME/.ssh/agent
export SSH_ASKPASS
ssh-add
fi
fi
*** BE SURE THAT IF YOU COPY AND PASTE THE THE "" AND THE "$usessh" are copied as well