Note: This is a beta release of Red Hat Bugzilla 5.0. The data contained within is a snapshot of the live data so any changes you make will not be reflected in the production Bugzilla. Also email is disabled so feel free to test any aspect of the site that you want. File any problems you find or give feedback here.
Bug 174653 - gdm login not running user's .bash_profile
Summary: gdm login not running user's .bash_profile
Status: CLOSED DUPLICATE of bug 177258
Alias: None
Product: Fedora
Classification: Fedora
Component: gdm
Version: rawhide
Hardware: All
OS: Linux
Target Milestone: ---
Assignee: Ray Strode [halfline]
QA Contact: Mike McLean
Depends On:
TreeView+ depends on / blocked
Reported: 2005-12-01 04:11 UTC by John Ellson
Modified: 2007-11-30 22:11 UTC (History)
0 users

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Clone Of:
Last Closed: 2006-01-10 02:55:05 UTC

Attachments (Terms of Use)

Description John Ellson 2005-12-01 04:11:33 UTC
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 21:00:31 UTC
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-08 04:47:42 UTC
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-10 02:55:05 UTC

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