Bug 159624 - startx failed to start ssh-agent
startx failed to start ssh-agent
Status: CLOSED DUPLICATE of bug 169259
Product: Fedora
Classification: Fedora
Component: xorg-x11-xinit (Show other bugs)
rawhide
All Linux
medium Severity medium
: ---
: ---
Assigned To: Søren Sandmann Pedersen
David Lawrence
: Reopened
Depends On:
Blocks: FC6Target
  Show dependency treegraph
 
Reported: 2005-06-06 04:23 EDT by Jeff Garzik
Modified: 2014-06-18 05:07 EDT (History)
4 users (show)

See Also:
Fixed In Version: FC5
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed: 2006-08-17 22:45:14 EDT
Type: ---
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---


Attachments (Terms of Use)

  None (edit)
Description Jeff Garzik 2005-06-06 04:23:09 EDT
From Bugzilla Helper:
User-Agent: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.7.8) Gecko/20050524 Fedora/1.0.4-4 Firefox/1.0.4

Description of problem:
Regression from Fedora Core 2 (possibly 3 as well):

I boot my machine into runlevel 3, and then start X manually using "startx".  Under FC2, ssh-agent would be started.  Under FC4, it is not.

grepping through the packages, it appears that xdm/gdm/kdm start ssh-agent, but someone forgot to update the startx path to do the same.


Version-Release number of selected component (if applicable):
xorg-x11-6.8.2-31

How reproducible:
Always

Steps to Reproduce:
1. Edit /etc/inittab to start at runlevel 3.
2. Reboot.
3. Run startx.
4. Attempt to run ssh-add.

  

Actual Results:  ssh-add fails, because ssh-agent is not running.

Expected Results:  ssh-add succeeds, because ssh-agent is running.


Additional info:
Comment 1 Chris Ricker 2005-06-10 15:15:33 EDT
It's a regression from 3. I'm seeing it with 4 as well
Comment 2 Andrew Benham 2005-06-19 09:19:01 EDT
/etc/X11/xinit/xinitrc-common used to start ssh-agent (pre-FC4)

Now (in FC4) it sets the SSH_AGENT environment variable, and other scripts
should to the right thing.

For xdm logins, /etc/X11/xdm/Xsessions does the right thing and runs $SSH_AGENT.

However /etc/X11/xinit/xinitrc needs to be updated - something like:

if [ -f $HOME/.Xclients ]; then
        exec $SSH_AGENT $DBUS_LAUNCH $HOME/.Xclients || \
        exec $SSH_AGENT $HOME/.Xclients
elif [ -f /etc/X11/xinit/Xclients ]; then
        exec $SSH_AGENT $DBUS_LAUNCH /etc/X11/xinit/Xclients || \
        exec $SSH_AGENT /etc/X11/xinit/Xclients
else
       # failsafe settings.  Although we should never get here
       # (we provide fallbacks in Xclients as well) it can't hurt.
       xclock -geometry 100x100-5+5 &
       xterm -geometry 80x50-50+150 &

       if [ -x /usr/X11R6/bin/twm ]; then
               exec $SSH_AGENT /usr/X11R6/bin/twm
       fi
fi


I'm presuming that the change was made to solve the problem which existed in
earlier versions that an ssh-agent was started by "startx" but that agent wasn't
killed when X exited - so one could end up with many ssh-agent processes running.
 
Comment 3 Mike A. Harris 2005-06-21 12:07:05 EDT
>I'm presuming that the change was made to solve the problem which existed
>in earlier versions that an ssh-agent was started by "startx" but that agent
>wasn't killed when X exited - so one could end up with many ssh-agent processes
>running.

I believe this is correct.  If someone has an idea how to solve both
problems, and also provide both levels of functionality, feel free to
suggest ideas for review.
Comment 4 Mike A. Harris 2006-06-27 13:27:56 EDT
If this problem still exists in FC5, please reopen.
Comment 5 Chris Ricker 2006-06-27 15:43:48 EDT
Still broken in FC5
Comment 6 Matthias Clasen 2006-07-06 17:48:54 EDT
Add to FC6Destop tracker
Comment 7 Ray Strode [halfline] 2006-07-25 15:07:31 EDT
so the ssh-agent man page says:

"If a commandline is given, this is executed as a subprocess of the agent.
When the command dies, so does the agent."

If it didn't behave that way, then the GDM case would have the same problem.  We
should just fix it with the proposed fix.
Comment 8 Kristian Høgsberg 2006-08-17 22:45:14 EDT

*** This bug has been marked as a duplicate of 169259 ***

Note You need to log in before you can comment on or make changes to this bug.