Bug 174653

Summary: gdm login not running user's .bash_profile
Product: [Fedora] Fedora Reporter: John Ellson <john.ellson>
Component: gdmAssignee: Ray Strode [halfline] <rstrode>
Status: CLOSED DUPLICATE QA Contact: Mike McLean <mikem>
Severity: medium Docs Contact:
Priority: medium    
Version: rawhide   
Target Milestone: ---   
Target Release: ---   
Hardware: All   
OS: Linux   
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2006-01-10 02:55:05 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 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):
gdm-2.8.0.4-13

How reproducible:
100%

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-2.8.0.4-13.1.

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

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

with

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