Bug 244264 - xdm not spawning WMs under a login shell
xdm not spawning WMs under a login shell
Status: CLOSED RAWHIDE
Product: Fedora
Classification: Fedora
Component: xorg-x11-xdm (Show other bugs)
7
All Linux
low Severity low
: ---
: ---
Assigned To: Søren Sandmann Pedersen
Fedora Extras Quality Assurance
: Reopened
: 223507 (view as bug list)
Depends On:
Blocks:
  Show dependency treegraph
 
Reported: 2007-06-14 15:14 EDT by Joshua Jensen
Modified: 2014-06-18 05:09 EDT (History)
4 users (show)

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed: 2007-08-24 10:08:43 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 Joshua Jensen 2007-06-14 15:14:23 EDT
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 06:43:21 EDT
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 14:53:31 EDT
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 08:34:28 EDT
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 10:23:31 EDT
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 10:28:44 EDT
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 10:31:06 EDT
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 14:53:55 EDT
Linking /etc/X11/xdm/Xsession to /etc/X11/xinit/Xsession doesn't work.
Comment 8 Joshua Jensen 2007-06-25 15:22:49 EDT
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 16:30:47 EDT
OK, you have persuaded me -- we've got a bug in xdm.
Comment 10 Ray Strode [halfline] 2007-06-25 16:51:41 EDT
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 18:23:10 EDT
I don't follow... what do you mean by "when I add the link" ?
Comment 12 Ray Strode [halfline] 2007-06-28 22:21:31 EDT
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-13 20:28:14 EDT
Not sure how I would discern the difference.  Ideas?
Comment 14 Ray Strode [halfline] 2007-07-18 10:47:18 EDT
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 18:07:08 EDT
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 10:08:43 EDT
should be fixed in tomorrow's rawhide:

xorg-x11-xdm-1.1.6-2.fc8
Comment 17 Patrice Dumas 2008-01-11 12:59:26 EST
*** Bug 223507 has been marked as a duplicate of this bug. ***

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