Bug 91604 - pdksh does not process .profile correctly
pdksh does not process .profile correctly
Product: Red Hat Linux
Classification: Retired
Component: pdksh (Show other bugs)
i386 Linux
medium Severity medium
: ---
: ---
Assigned To: Karsten Hopp
Depends On:
  Show dependency treegraph
Reported: 2003-05-25 14:16 EDT by Rob Hughes
Modified: 2007-04-18 12:54 EDT (History)
0 users

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Last Closed: 2004-07-05 06:16:31 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 Rob Hughes 2003-05-25 14:16:07 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):

How reproducible:

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.

Additional info:

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.
Comment 1 Karsten Hopp 2003-07-29 08:42:31 EDT
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 ? 
Comment 2 Paul Watson 2003-07-29 11:58:59 EDT
The user has pdksh as their login shell.  Neither exporting POSIXLY_COORECT or 
doing set -o posix before running startx corrects the problem.
Comment 3 Paul Watson 2003-08-19 16:51:49 EDT
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 
Comment 4 Rob Hughes 2003-08-19 21:11:03 EDT
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.
Comment 5 Karsten Hopp 2004-07-05 06:16:31 EDT
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. 

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