Bugzilla (bugzilla.redhat.com) will be under maintenance for infrastructure upgrades and will not be available on July 31st between 12:30 AM - 05:30 AM UTC. We appreciate your understanding and patience. You can follow status.redhat.com for details.
Bug 83496 - not asked for SSH passphrase on GDM login
Summary: not asked for SSH passphrase on GDM login
Alias: None
Product: Red Hat Public Beta
Classification: Retired
Component: XFree86
Version: phoebe
Hardware: i386
OS: Linux
Target Milestone: ---
Assignee: Mike A. Harris
QA Contact: David Lawrence
Depends On:
TreeView+ depends on / blocked
Reported: 2003-02-04 22:00 UTC by Michael Wardle
Modified: 2007-04-18 16:50 UTC (History)
1 user (show)

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Clone Of:
Last Closed: 2003-02-05 07:02:01 UTC

Attachments (Terms of Use)

Description Michael Wardle 2003-02-04 22:00:06 UTC
Description of problem: 
When logging in to the system from the GNOME Display Manager, selecting the GNOME session causes ssh-agent 
to be run before running the usual GNOME session.  Selecting a different session (such as KDE) does not invoke 
Version-Release number of selected component (if applicable): 
How reproducible: 
Steps to Reproduce: 
1. Set GDM as default display manager 
2. Select KDE as the session, then log in 
Actual results: 
KDE is started. 
Expected results: 
A dialog appears prompting for the SSH passphrase before KDE is started. 
Additional info: 
The session is called from /etc/X11/gdm/Sessions/*, which in turn calls /etc/X11/xdm/Xsession <sessionname>. 
The GNOME session runs "exec -l $SHELL -c "$SSHAGENT gnome-session"", but the KDE session runs 
"exec -l $SHELL -c "$SSHAGENT /usr/share/apps/switchdesk/Xclients.kde"", which is equivalent to 
"exec -l $SHELL -c "$SSHAGENT exec startkde". 
Presumably the fix is to change the line to be more similar to the GNOME session to read: 
"exec -l $SHELL -c "$SSHAGENT startkde" 
or perhaps to remove the exec from /usr/share/apps/switchdesk/Xclients.kde if that is possible. 
This behavior should also be exhibited by XDM, as it uses the same session scripts.

Comment 1 Michael Wardle 2003-02-05 06:44:15 UTC
It turns out ssh-agent was only invoked under the GNOME session because I had it in my ~/.xsession, and the 
Default session was being used rather than the GNOME session, meaning the out-of-the-box configuration does 
not start ssh-agent for any session. 
My ~/.xsession looks like: 
`eval ssh-agent` 
ssh-add < /dev/null 
which gnome-session && exec gnome-session 
which startkde && exec startkde 
In case ssh-agent is at fault, its version is openssh-clients-3.5p1-2. 

Comment 2 Michael Wardle 2003-02-05 07:02:01 UTC
I misunderstood the purpose of ssh-agent. 
ssh-add is what prompts for the passphrase, and this is not in the Xsession script, so naturally it will not be run. 
I guess I'd like ssh-add to be run immediately after ssh-agent, so I am prompted for my SSH passphrase when 
logging in, but the issue I reported is not a bug, and there is probably a reason why my desired functionality is not 
the default. 
Hope I've not taken too much of anyone's time. 

Comment 3 Joshua Jensen 2003-02-05 22:23:55 UTC
Michael Wardle, if you want to be prompted for your ssh passphrase immediately
when GNOME/KDE/X starts, you can create a executable .Xclients file (instead of
your .xsession file) in your home directory.  It would in fact be very similar
to  your .xsession file, but since ssh-agent is already active as an ancestor
process to X, you just need to call ssh-add graphically.

Here is what I have:

[joshua@joshua joshua]$ cat ~/.Xclients
(sleep 10; xterm -e ssh-add) &
exec gnome-session

Just a suggestion...

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