Bugzilla will be upgraded to version 5.0 on a still to be determined date in the near future. The original upgrade date has been delayed.
Bug 7221 - ".profile" files are not executed for non-bash shells under X window
".profile" files are not executed for non-bash shells under X window
Product: Red Hat Linux
Classification: Retired
Component: gdm (Show other bugs)
All Linux
medium Severity medium
: ---
: ---
Assigned To: Elliot Lee
Depends On:
  Show dependency treegraph
Reported: 1999-11-22 05:34 EST by John Horne
Modified: 2008-05-01 11:37 EDT (History)
0 users

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Last Closed: 2000-05-24 16:06:36 EDT
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 Horne 1999-11-22 05:34:03 EST
I use the Korn shell (pdksh) by default. I also run my ssytem at init level
5 by default. I use KDE by default.
However, the ".profile" file in my home directory does not get executed
at login. Under RH5.2 (from which I upgraded) it did. I have tried this
with the 'ash' shell as well and got the same result. Bash does not
have this problem. Running the system at init 2 or 3 it all works okay.

It seems that bash and Csh have special handling for the login scripts -
hence no problem with them. However, for any other shell combined with
X window being run by default, ther eis nothing saying to execute a
file in the users home directory.

Under RH5.2 the file /etc/X11/kdm/Xsession existed to do this. At 6.1 it
seems that both KDE and gnome run the file /etc/X11/xdm/Xsession.
From 5.2 I have included into this file:

if [ -r "$HOME/.profile ]; then
   . "$HOME/.profile"

The RH5.2 system had an 'else' part to this statement - but I left it ot
it was never executed by me (it ran something I don't use).

Comment 1 Chris Siebenmann 1999-11-22 18:30:59 EST
The current approach for setting up the environment when one logs
in via a graphical login appears to be to start scripts with
	#!/bin/bash -login
and assume that everyone uses bash or something compatable enough,
and writes their login dotfiles nicely, so that 'bash -login' will
work. As you've noticed, this doesn't always fly (especially for
people using login shells, such as tcsh, that don't use .profile et
al at all).
Comment 2 Trond Eivind Glomsrxd 2000-04-06 17:56:59 EDT
Remember to specify that each kterm is to be a login shell - then you'll avoid
the problem
Comment 3 Trond Eivind Glomsrxd 2000-05-09 10:05:59 EDT
This isn't a ksh problem - we are aware of it (and have been so for some time),
and are thinking about how to fix this (not just ksh...). I think gdm is a
better candidate component.
Comment 4 David Mason 2000-05-24 16:06:59 EDT
Elliot - is gdm the answer to this problem? What do you think?
Comment 5 Elliot Lee 2000-07-17 16:09:22 EDT
Since the 'Xsession' script uses 'bash -login', things should be initialized
correctly AFAIK. I don't see any csh- or bash-specific logic other than assuming
that bash can initialize things correctly.

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