View previous topic :: View next topic |
Author |
Message |
HePeR n00b
Joined: 04 Oct 2002 Posts: 39
|
Posted: Thu Dec 19, 2002 1:44 pm Post subject: ssh-agent |
|
|
When i just start the ssh-agent i runs but doesnt export env-variables like
SSH_AUTH_SOCK and SSH_AGENT_PID
when i eval 'ssh-agent' it says it does export those but they aren't in when i printenv
and they ssh-agent don't work until i manually export those variables
I there a fix for this ??
thx
HePeR |
|
Back to top |
|
|
arthax n00b
Joined: 10 Dec 2002 Posts: 48
|
Posted: Fri Dec 20, 2002 12:10 am Post subject: Re: ssh-agent |
|
|
HePeR wrote: | When i just start the ssh-agent i runs but doesnt export env-variables like
SSH_AUTH_SOCK and SSH_AGENT_PID
|
Because it forks.
HePeR wrote: |
when i eval 'ssh-agent' it says it does export those but they aren't in when i printenv
and they ssh-agent don't work until i manually export those variables
I there a fix for this ??
thx
HePeR |
Try this in terminal shell
Code: |
exec /usr/bin/ssh-agent $SHELL
echo $SSH_AGENT_PID
echo $SSH_AUTH_SOCK
|
It works, but it isn't a global setting!
mu |
|
Back to top |
|
|
Alowishus n00b
Joined: 18 Apr 2002 Posts: 22
|
Posted: Fri Dec 20, 2002 3:52 am Post subject: |
|
|
This may seep into the Desktop Forum topic range, but what's the "Gentoo way" of getting ssh-agent to run underneath the X session like it's supposed to? I figure there's gotta be a neat little setting somewhere so that I don't have to go hand-editing xinit scripts. |
|
Back to top |
|
|
rtn Guru
Joined: 15 Nov 2002 Posts: 427
|
Posted: Fri Dec 20, 2002 4:54 pm Post subject: |
|
|
Alowishus wrote: | This may seep into the Desktop Forum topic range, but what's the "Gentoo way" of getting ssh-agent to run underneath the X session like it's supposed to? I figure there's gotta be a neat little setting somewhere so that I don't have to go hand-editing xinit scripts. |
That depends on how you start your X session.
If you use gdm, it should start by default, check out
/etc/X11/gdm/gnomerc.
If you run startx from your .bash_login, like I used to, you could
wrap ssh-agent around startx:
Code: | if [ `tty` = "/dev/vc/1" ]; then
echo ""
echo "Starting X in 2 seconds (type Control-C to interrupt)"
sleep 2
echo ""
/usr/bin/ssh-agent -- startx > .Xoutput 2> .Xerrorlog
clear # get rid of annoying cursor rectangle
logout # logout after leaving windows system
fi
|
If you run startx from a command prompt, you can could add the agent
to your .xinitrc (which you said you didn't really want to do):
Code: | exec /usr/bin/ssh-agent -- /usr/bin/gnome-session |
--rtn |
|
Back to top |
|
|
sebest Apprentice
Joined: 03 Jul 2002 Posts: 163 Location: Paris - France
|
|
Back to top |
|
|
|