Bug 174653 - gdm login not running user's .bash_profile
gdm login not running user's .bash_profile
Status: CLOSED DUPLICATE of bug 177258
Product: Fedora
Classification: Fedora
Component: gdm (Show other bugs)
All Linux
medium Severity medium
: ---
: ---
Assigned To: Ray Strode [halfline]
Mike McLean
Depends On:
  Show dependency treegraph
Reported: 2005-11-30 23:11 EST by John Ellson
Modified: 2007-11-30 17:11 EST (History)
0 users

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Last Closed: 2006-01-09 21:55:05 EST
Type: ---
Regression: ---
Mount Type: ---
Documentation: ---
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---

Attachments (Terms of Use)

  None (edit)
Description John Ellson 2005-11-30 23:11:33 EST
Description of problem:
gdm login not running user's .bash_profile

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

How reproducible:

Steps to Reproduce:
1.set something in user's environment in ~/.bash_profile
2.login via gdm
3.see if it was set
Actual results:
not set

Expected results:
~/.bash_profile should be run

Additional info:
Comment 1 Michal Jaegermann 2005-12-19 16:00:31 EST
This is still a problem for an updated gdm-

After replacing in /etc/X11/gdm/Xsession this line

test -f "$HOME/.profile" && . "$HOME/.profile"


test -f "$HOME/.bash_profile" && . "$HOME/.bash_profile" || \
{ test -f "$HOME/.profile" && . "$HOME/.profile"; }

and only one of such files will be used even if both happen to exist.
Maybe this should be contigent on a value of $SHELL?

Comment 2 Havoc Pennington 2006-01-07 23:47:42 EST
dup of #173438

The correct fix is to run the user's shell as a login shell (exec -l), not to
manually run the .profile or something.

We spent a ton of time years ago making sure you got exactly one login shell in
all the different ways to login (console, startx, gdm, xdm, tcsh, bash), it's
very annoying, one of those things it was better to just not touch if possible ;-)

Anyway, anytime you login the "root"/first-spawned shell should be a login
shell, and no other shells should be login shells. This makes the right scripts
run the right number of times.
Comment 3 Ray Strode [halfline] 2006-01-09 21:55:05 EST

*** 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.