Bug 173438 - GDM Xsession does not start a login shell; .bash_profile doesn't run
GDM Xsession does not start a login shell; .bash_profile doesn't run
Status: CLOSED DUPLICATE of bug 177258
Product: Fedora
Classification: Fedora
Component: gdm (Show other bugs)
rawhide
All Linux
medium Severity medium
: ---
: ---
Assigned To: Ray Strode [halfline]
Mike McLean
:
: 173463 174157 (view as bug list)
Depends On:
Blocks: FC5Blocker
  Show dependency treegraph
 
Reported: 2005-11-16 21:50 EST by Anders Kaseorg
Modified: 2007-11-30 17:11 EST (History)
4 users (show)

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed: 2006-01-09 21:56:47 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 Anders Kaseorg 2005-11-16 21:50:02 EST
Description of problem:
In FC4, the /etc/X11/xdm/Xsession script ran the desktop inside a login shell:
  exec -l $SHELL -c "$SSH_AGENT $DBUS_LAUNCH gnome-session"
But in FC5, /etc/X11/gdm/Xsession only makes a half-hearted attempt at sourcing
~/.profile (regardless of what the user's shell actually is), and does not run a
login shell:
  eval exec $sshagent $dbuslaunch $command
Thus, the user's ~/.bash_profile (or equivalent configuration for whatever shell
they use) never gets run.

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

How reproducible:
Always

Steps to Reproduce:
1. Put something useful in ~/.bash_profile
2. Log in with GDM
Comment 1 Lars G 2005-11-17 06:41:00 EST
same behavior here
Comment 2 Kenneth Topp 2005-11-23 14:29:13 EST
see bug  173463 
Comment 3 Michal Jaegermann 2005-11-23 17:42:14 EST
At least for now the following patch:

--- /etc/X11/gdm/Xsession~	2005-11-16 11:12:59.000000000 -0700
+++ /etc/X11/gdm/Xsession	2005-11-23 15:19:56.000000000 -0700
@@ -36,7 +36,8 @@ echo "$0: Beginning session setup..."
 
 # First read /etc/profile and .profile
 test -f /etc/profile && . /etc/profile
-test -f "$HOME/.profile" && . "$HOME/.profile"
+test -f "$HOME/.bash_profile" && . "$HOME/.bash_profile" || \
+{ test -f "$HOME/.profile" && . "$HOME/.profile"; }
 # Second read /etc/xprofile and .xprofile for X specific setup
 test -f /etc/xprofile && . /etc/xprofile
 test -f "$HOME/.xprofile" && . "$HOME/.xprofile"

allows to run ~/.bash_profile or ~/.profile.  This clearly is not doing
anything useful with ssh_agent.
Comment 4 Mike A. Harris 2005-11-24 11:51:15 EST
Why isn't gdm using the system Xsession?  Please change it to do that
instead.  Let me know if there is a problem with the system one so it
can be fixed, rather than shipping multiple inconsistent versions.

TIA
Comment 5 Mike A. Harris 2005-11-24 11:51:48 EST
*** Bug 173463 has been marked as a duplicate of this bug. ***
Comment 6 Havoc Pennington 2005-11-25 05:41:36 EST
*** Bug 174157 has been marked as a duplicate of this bug. ***
Comment 7 Havoc Pennington 2005-11-25 05:42:53 EST
Changing to:
   exec -l $SHELL -c "otherstuff"
in the gdm Xsession fixes it for me.
Comment 8 Anthony Thyssen 2005-11-30 01:11:06 EST
The gdm/Xsession script also will not look for .xinitrc at all, and will only
execute a .xsession if it is found and executable, AND "custom" (rather than
"default") is given from the GDM login.  However "custom" is not provided and
should not be needed to handle a users ".xsession" script.

The old xdm/Xsession  will execute it, or even exec a bash on it!

This is not good!
Comment 9 Anthony Thyssen 2005-11-30 01:11:41 EST
The gdm/Xsession script also will not look for .xinitrc at all, and will only
execute a .xsession if it is found and executable, AND "custom" (rather than
"default") is given from the GDM login.  However "custom" is not provided and
should not be needed to handle a users ".xsession" script.

The old xdm/Xsession  will execute it, or even exec a bash on it!

This is not good!
Comment 10 Ray Strode [halfline] 2005-11-30 11:12:08 EST
Hi,

Yea we should probably just go back to the old one.  I'll have a look sometime
this week.
Comment 11 Ville Skyttä 2005-11-30 11:32:23 EST
Setting BaseXsession=/etc/X11/xinit/Xsession in gdm.conf seems to be working
well here.
Comment 12 Ray Strode [halfline] 2006-01-09 21:56:47 EST
Hey guys, should be fixed in tomorrow's rawhide (and test2)

*** This bug has been marked as a duplicate of 177258 ***

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