Bug 83496 - not asked for SSH passphrase on GDM login
not asked for SSH passphrase on GDM login
Status: CLOSED NOTABUG
Product: Red Hat Public Beta
Classification: Retired
Component: XFree86 (Show other bugs)
phoebe
i386 Linux
medium Severity medium
: ---
: ---
Assigned To: Mike A. Harris
David Lawrence
:
Depends On:
Blocks:
  Show dependency treegraph
 
Reported: 2003-02-04 17:00 EST by Michael Wardle
Modified: 2007-04-18 12:50 EDT (History)
1 user (show)

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed: 2003-02-05 02:02:01 EST
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 Michael Wardle 2003-02-04 17:00:06 EST
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 
ssh-agent. 
 
Version-Release number of selected component (if applicable): 
XFree86-4.2.99.2-0.20021217.0 
XFree86-xdm-4.2.99.2-0.20021217.0 
gdm-2.4.0.7-14 
switchdesk-3.9.8-10 
 
How reproducible: 
Always 
 
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 01:44:15 EST
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 02:02:01 EST
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 17:23:55 EST
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.