Note: This is a beta release of Red Hat Bugzilla 5.0. The data contained within is a snapshot of the live data so any changes you make will not be reflected in the production Bugzilla. Also email is disabled so feel free to test any aspect of the site that you want. File any problems you find or give feedback here.
Bug 159624 - startx failed to start ssh-agent
Summary: startx failed to start ssh-agent
Keywords:
Status: CLOSED DUPLICATE of bug 169259
Alias: None
Product: Fedora
Classification: Fedora
Component: xorg-x11-xinit
Version: rawhide
Hardware: All
OS: Linux
medium
medium
Target Milestone: ---
Assignee: Søren Sandmann Pedersen
QA Contact: David Lawrence
URL:
Whiteboard:
Depends On:
Blocks: FC6Target
TreeView+ depends on / blocked
 
Reported: 2005-06-06 08:23 UTC by Jeff Garzik
Modified: 2014-06-18 09:07 UTC (History)
4 users (show)

Fixed In Version: FC5
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2006-08-18 02:45:14 UTC


Attachments (Terms of Use)

Description Jeff Garzik 2005-06-06 08:23:09 UTC
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 19:15:33 UTC
It's a regression from 3. I'm seeing it with 4 as well

Comment 2 Andrew Benham 2005-06-19 13:19:01 UTC
/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 16:07:05 UTC
>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 17:27:56 UTC
If this problem still exists in FC5, please reopen.

Comment 5 Chris Ricker 2006-06-27 19:43:48 UTC
Still broken in FC5

Comment 6 Matthias Clasen 2006-07-06 21:48:54 UTC
Add to FC6Destop tracker

Comment 7 Ray Strode [halfline] 2006-07-25 19:07:31 UTC
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-18 02:45:14 UTC

*** 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.