Bug 91604 - pdksh does not process .profile correctly
Summary: pdksh does not process .profile correctly
Keywords:
Status: CLOSED WORKSFORME
Alias: None
Product: Red Hat Linux
Classification: Retired
Component: pdksh
Version: 9
Hardware: i386
OS: Linux
medium
medium
Target Milestone: ---
Assignee: Karsten Hopp
QA Contact:
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2003-05-25 18:16 UTC by Rob Hughes
Modified: 2007-04-18 16:54 UTC (History)
0 users

Fixed In Version:
Clone Of:
Environment:
Last Closed: 2004-07-05 10:16:31 UTC
Embargoed:


Attachments (Terms of Use)

Description Rob Hughes 2003-05-25 18:16:07 UTC
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
processed.

Version-Release number of selected component (if applicable):
pdksh-5.2.14-21

How reproducible:
Always

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 12:42:31 UTC
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 15:58:59 UTC
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 20:51:49 UTC
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 
processed.

Comment 4 Rob Hughes 2003-08-20 01:11:03 UTC
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 10:16:31 UTC
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.