Bug 467025 - Ksh fails to initialise environment when login from graphic console
Ksh fails to initialise environment when login from graphic console
Product: Fedora
Classification: Fedora
Component: ksh (Show other bugs)
x86_64 Linux
medium Severity high
: ---
: ---
Assigned To: Michal Hlavinka
Fedora Extras Quality Assurance
Depends On:
  Show dependency treegraph
Reported: 2008-10-15 05:53 EDT by Patrick Bégou
Modified: 2008-11-11 21:54 EST (History)
1 user (show)

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Last Closed: 2008-10-21 13:47:32 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 Patrick Bégou 2008-10-15 05:53:52 EDT
Description of problem:
environment-modules-3.2.6-5.fc9.x86_64 uses /etc/profile.d/modules.sh file for intialisation. When I logon from the graphic console the file is processed (variables like MODULESHOME or MODULEPATH are set) but the line:
module() { eval `/usr/bin/modulecmd sh $*`; }
doesn't define this function. When using the "module" command I get "command not found"

If I use bash it is working (the alias is set)
If I logon with ssh from a remote host and use ksh it is working (the alias is set)
If I manualy process the /etc/profile.d/modules.sh it is working.

Version-Release number of selected component (if applicable):
Linux #1 SMP

How reproducible:

Steps to Reproduce:
1. set your login shel to /bin/ksh
2. logon from graphic console
3. try the "module avail" command (it's not working)
4. . /etc/profile.d/modules.sh
5. try the "module avail" command (it's OK)
Actual results:

Expected results:

Additional info:
Comment 1 Michal Hlavinka 2008-10-21 13:47:32 EDT
it's fixed now:
in F9 since ksh-20080202-2.fc9
in Rawhide since ksh-20080725-4.fc10

kshrc has been added to /etc/ and .kshrc to /etc/skel 

Path is set via ${HOME}/.kshrc (sourcing /etc/kshrc) = only for new users. If you don't have your own .kshrc file in home directory, you can use one from /etc/skel
Comment 2 Fedora Update System 2008-10-22 04:17:36 EDT
ksh-20080202-2.fc9 has been submitted as an update for Fedora 9.
Comment 3 Fedora Update System 2008-11-11 21:54:43 EST
ksh-20080202-2.fc9 has been pushed to the Fedora 9 stable repository.  If problems still persist, please make note of it in this bug report.

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