Bug 244264

Summary: xdm not spawning WMs under a login shell
Product: [Fedora] Fedora Reporter: Joshua Jensen <joshua>
Component: xorg-x11-xdmAssignee: Søren Sandmann Pedersen <sandmann>
Status: CLOSED RAWHIDE QA Contact: Fedora Extras Quality Assurance <extras-qa>
Severity: low Docs Contact:
Priority: low    
Version: 7CC: daly, kem, mcepl, rstrode, xgl-maint
Target Milestone: ---Keywords: Reopened
Target Release: ---   
Hardware: All   
OS: Linux   
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2007-08-24 14:08:43 UTC Type: ---
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:

Description Joshua Jensen 2007-06-14 19:14:23 UTC
Description of problem:

When using GDM, logging in and starting gnome-session leads to gnome-terminals
and xterms that spawn *login* shells... ie, they source ~/.bash_profile

Changing /etc/sysconfig/desktop to say DISPLAYMANAGER=XDM changes that:
gnome-terminal and xterm shells are non-login shells.

Is this intended behavior?  Seems like a bug to me.

SELINUX=permissive, so it isn't SELINUX getting in the way.

Version-Release number of selected component (if applicable):

xorg-x11-xdm-1.1.3-1.fc7.i386

Comment 1 Matěj Cepl 2007-06-22 10:43:21 UTC
Cannot reproduce here with FC7. I have switched the default display manager by
editing /etc/sysconfig/desktop as described by you. Then I have created this
more or less minimal ~/.xsession file (chmod :

#!/bin/sh
twm &
xrdb -merge "$HOME/.Xresources"
emacs -geometry +0+50 &
exec xterm -geometry 80x24+10+10 -ls

When I have restarted Xorg (telinit 3 ; telinit 5) I got very friendly advanced
login screen of xdm ;-). Login went to the desktop, where everything works as
expected, and variables which are set only in ~/.bash_profile are present.

I would suspect that there is something weird in your configuration. Closing as
WORKSFORME, and if you are certain that this is real bug, please, reopen with
the information required to persuade me that I am wrong.



Comment 2 Joshua Jensen 2007-06-22 18:53:31 UTC
Are you looking at the xterm you that you've exec'ed ?  I wonder if that could
be different.

Anyway, more details. Try it with gnome by putting *only* a "exec gnome-session"
in your ~/.xsession file.  Thats how I'm doing it.  Any xterm or gnome-terminal
you start from within GNOME (not twm) won't source ~/.bash_profile.

Comment 3 Matěj Cepl 2007-06-25 12:34:28 UTC
OK, it seems to me that if anything then this is gnome-session issue. Changing
component of this bug accordingly with serious doubts whether anybody will want
to support something so weird as gnome-session from xdm session.

Comment 4 Joshua Jensen 2007-06-25 14:23:31 UTC
It can't be that hard to get gnome to properly behave, regardless of how it is
started.  

Comment 5 Ray Strode [halfline] 2007-06-25 14:28:44 UTC
Nope, my guess is this is a dupe of that old bug "xdm should use system Xsession
script", which I can't find offhand.

Joshua, if you rm /etc/X11/xdm/Xsession and ln /etc/X11/xinit/Xsession
/etc/X11/xdm/Xsession do things start working?

Comment 6 Ray Strode [halfline] 2007-06-25 14:31:06 UTC
This has nothing to do with gnome by the way.  We only want one login shell to
get invoked during login, and it needs to happen no matter which desktop
environment gets loaded, so it has to happen before it gets loaded.  That's
handled by the xinit scripts.

But I believe xdm uses its own broken copies of the scripts instead of the
system ones.

Comment 7 Joshua Jensen 2007-06-25 18:53:55 UTC
Linking /etc/X11/xdm/Xsession to /etc/X11/xinit/Xsession doesn't work.

Comment 8 Joshua Jensen 2007-06-25 19:22:49 UTC
I've tried this with "exec startxfce4" in my ~/.xsession too... same problem. 
Not gnome or WM related... but xdm related.

Please fix!

Comment 9 Matěj Cepl 2007-06-25 20:30:47 UTC
OK, you have persuaded me -- we've got a bug in xdm.

Comment 10 Ray Strode [halfline] 2007-06-25 20:51:41 UTC
Joshua, are you sure it's not execing a login shell as part of the login process
when you add the link? Maybe you're also getting hit by bug 217783 ?

Comment 11 Joshua Jensen 2007-06-28 22:23:10 UTC
I don't follow... what do you mean by "when I add the link" ?

Comment 12 Ray Strode [halfline] 2007-06-29 02:21:31 UTC
I'm just refering to what we talked about in Comment 5 and Comment 7.  I'm
wonder if doing Comment 5 did fix this problem, but you're ALSO getting hit by
bug 217783.

Comment 13 Joshua Jensen 2007-07-14 00:28:14 UTC
Not sure how I would discern the difference.  Ideas?

Comment 14 Ray Strode [halfline] 2007-07-18 14:47:18 UTC
How are you figuring out that a login shell is being executed?

You can temporarily test if you're being hit by bug 217783 by running chmod -x
/usr/bin/ssh-agent, logging out, and logging back in.

After you're done testing be sure to chmod +x /usr/bin/ssh-agent again.

Comment 15 Joshua Jensen 2007-08-23 22:07:08 UTC
Ok... I've confirmed.  ssh-agent's executable'ness has nothing to do with it.

I retract what I said in comment #7.  That clearly works... using the
xinit/Xsession instead of the xdm/Xsession.

I'm testing with "export ttt=zzz" in my ~/.bash_profile file.
echo $ttt shows me if it is a login shell or not

So... this means the xdm's Xsession is not calling a login shell.  Can we get a fix?

Comment 16 Ray Strode [halfline] 2007-08-24 14:08:43 UTC
should be fixed in tomorrow's rawhide:

xorg-x11-xdm-1.1.6-2.fc8

Comment 17 Patrice Dumas 2008-01-11 17:59:26 UTC
*** Bug 223507 has been marked as a duplicate of this bug. ***