Red Hat Bugzilla – Bug 91604
pdksh does not process .profile correctly
Last modified: 2007-04-18 12:54:00 EDT
From Bugzilla Helper:
User-Agent: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.2.1) Gecko/20030225
Description of problem:
pdksh fails to properly process all entries in ~/.profile from a GUI login. For
example, using a .profile containing "set -o vi", this is not processed. When
logging in at a shell prompt, it is processed correctly. Also, if a shell prompt
is opened, and "su - $USER" is used, then the entire .profile file is correctly
Version-Release number of selected component (if applicable):
Steps to Reproduce:
1. Set ksh as the default shell
2. Login via GDM
3. Find many settings from .profile not processed
Actual Results: .profile is not correctly processed
Expected Results: .profile would be fully processed from a GUI login, as it is
in Solaris or UX.
IIRC, posix compliance requires that the .profile be completely processed no
matter how one logs in. A lot of it is, such as if I add a program there. For
example, I use both imwheel and lineakd. These entries are processed, as are
most export statements. Things like set statements and aliases aren't though.
pdksh isn't compiled with posix_compliant mode enabled. Does it help when you
enable posix mode with 'set -o posix' or by exporting the variable POSIXLY_CORRECT
before pdksh is started ?
The user has pdksh as their login shell. Neither exporting POSIXLY_COORECT or
doing set -o posix before running startx corrects the problem.
In the terminal session, if I choose Edit/Current Profile/Title and Command tab
then enable "Run command as a login shell" the login script appears to be
That must be a gnome thing, because it doesn't appear as an option in kshell.
Even if it did, it would not explain why when opening my vars aren't set.
Setting several vars, doing a set -o vi, and setting a number of aliases each
time I open a shell is... annoying, to say the least.
Basically, I'd just like to see ksh on linux work the same way it does on every
other *nix I use.
This works for me, although I'm not using gdm to log in.
Feel free to reopen the report if the problem still exists with
current Fedora Core version, but make sure to change the component
to gdm as this isn't a pdksh bug. pdksh parses /etc/profile and
~/.profile just fine when you log in on a text console or with xdm.