From Bugzilla Helper:
User-Agent: Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.0; Q312461)
Description of problem:
login via xdm apparently does not create a proper login shell process.
In particular, if the user's default shell is bash, the .bash_profile
and .bash_logout scripts are not run at the proper times.
Version-Release number of selected component (if applicable):
Steps to Reproduce:
1.Set up Linux machine with xdm (x windows)
2.Create user with bash as login shell
3.Create .bash_profile and .bash_logout scripts for this user whose execution
can be verified.
4.Log in and check if .bash_profile has been run
5.Log out from xdm session and check for .bash_logout having been run
Actual Results: Commands in the .bash_profile, and .bash_logout were never run.
Expected Results: Commands in .bash_profile should be run as soon as user logs
in BEFORE his xdm session is visible.
Commands in .bash_logout should be run when xdm seesion is terminated.
The first process run with the logged in user's id appears to be /bin/sh which
runs the script to run KDE (or GNOME ...). This process needs to be changed to
be a LOGIN shell for the user.
When logged into xdm/gdm/kdm or while in an X session started from
the commandline via "startx", by default most (possibly all) X
terminal emulators start up using non-login subshells.
The "bash" shell only processes the .bash_profile file on interactive
login shells, so by default, starting any terminal emulator without
specifying a login shell will give a non-login subshell. This is
If you have any commands present in .bash_profile which you would
like to have invoked automatically by all shells, it is best to
place this code in the .bashrc file instead, as that is sourced
by all shells.
The full rules for which startup files are sourced by bash under
various conditions are documented in detail on the bash manpage
under the "INVOCATION" section.
If you prefer nonetheless to have your terminals invoke login
shells always, refer to the terminal emulator's commandline
usage screen, manpages or other documentation for how to invoke
the shell as a login shell. For xterm, this can be done by
invoking it as "xterm -ls". Other terminals have similar
commandline switches that may work the same.
Setting status to "NOTABUG".