[xmonad] darcs patch: add SshAgent module,
to start ssh-agent when needed.
Brandon S. Allbery KF8NH
allbery at ece.cmu.edu
Sun Mar 30 19:40:15 EDT 2008
On Mar 30, 2008, at 9:35 , Jamie Webb wrote:
> On 2008-03-29 12:55:15 David Roundy wrote:
>> I'm sending this rather than pushing, since we're close to a
>> release. It's a new module to automatically start an ssh-agent, if
>> one isn't running. I expect to find it useful. The reason for this
>> is that the ordinary mechanism for starting a single ssh-agent for an
>> X session doesn't seem to be working for me. And starting xmonad
>> with `ssh-agent xmonad` does no good, because the ssh-agent exits as
>> soon as I restart xmonad.
>
> My .xsession has
>
> eval `ssh-agent`
>
> before it starts xmonad, and it seems to work fine. Does this not work
> for you?
One caveat: .xsession is almost always a {,ba}sh script but the
user's $SHELL might be {,t}csh, leading ssh-agent to do the wrong
thing. Safest is "eval `ssh-agent -s`" to force it to use the sh/
bash commands.
We tossed this around a bit on #xmonad last night and the above was
the preferred solution. A variant that may solve other odd problems
regarding placement and relay of ssh agent information to all
subprocesses is:
mv .xsession .xsession-real
echo '#! /bin/sh' >.xsession
echo 'exec ssh-agent $HOME/.xsession-real' >>.xsession
chmod +x .xsession
--
brandon s. allbery [solaris,freebsd,perl,pugs,haskell] allbery at kf8nh.com
system administrator [openafs,heimdal,too many hats] allbery at ece.cmu.edu
electrical and computer engineering, carnegie mellon university KF8NH
More information about the xmonad
mailing list