Bug 92132 - zsh does not source /etc/profile or /etc/profile.d/*
zsh does not source /etc/profile or /etc/profile.d/*
Status: CLOSED DUPLICATE of bug 88457
Product: Red Hat Linux
Classification: Retired
Component: zsh (Show other bugs)
9
All Linux
medium Severity medium
: ---
: ---
Assigned To: Jens Petersen
Mike McLean
:
Depends On:
Blocks:
  Show dependency treegraph
 
Reported: 2003-06-02 21:13 EDT by Ian Macdonald
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:
Environment:
Last Closed: 2006-02-21 13:53:20 EST
Type: ---
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---


Attachments (Terms of Use)

  None (edit)
Description Ian Macdonald 2003-06-02 21:13:33 EDT
From Bugzilla Helper:
User-Agent: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.4) Gecko/20030531

Description of problem:
zsh, as shipped, does not source /etc/profile. Consequently, files in
/etc/profile.d aren't sourced either.

This is because zsh only sources /etc/profile when run in sh or ksh
compatibility mode. By default, it does not run in either of these modes.

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


How reproducible:
Always

Steps to Reproduce:
1. chsh your shell to /bin/zsh
2. open a log-in shell
3. notice that /etc/profile has had no effect
    

Actual Results:  Neither /etc/profile nor anything in /etc/profile.d/* sourced.

Expected Results:  Sourcing /etc/profile and stuff in /etc/profile.d/* is desirable.

Additional info:

A workaround is to add 'emulate sh' to /etc/zshrc, but that's not necessarily
desirable, since it changes some of zsh's default settings.
Comment 1 Ian Macdonald 2003-06-02 23:53:57 EDT
I gave a workaround in my bug report, but the fix is equally obvious. Add the
following line to /etc/zshrc:

. /etc/profile
Comment 2 Jens Petersen 2003-06-03 01:03:15 EDT
Try adding the contents of "/etc/skel/.zshrc" to your .zshrc file.


*** This bug has been marked as a duplicate of 88457 ***
Comment 3 Red Hat Bugzilla 2006-02-21 13:53:20 EST
Changed to 'CLOSED' state since 'RESOLVED' has been deprecated.

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