Bug 92132 - zsh does not source /etc/profile or /etc/profile.d/*
Summary: zsh does not source /etc/profile or /etc/profile.d/*
Status: CLOSED DUPLICATE of bug 88457
Alias: None
Product: Red Hat Linux
Classification: Retired
Component: zsh
Version: 9
Hardware: All
OS: Linux
Target Milestone: ---
Assignee: Jens Petersen
QA Contact: Mike McLean
Depends On:
TreeView+ depends on / blocked
Reported: 2003-06-03 01:13 UTC by Ian Macdonald
Modified: 2007-04-18 16:54 UTC (History)
0 users

Clone Of:
Last Closed: 2006-02-21 18:53:20 UTC

Attachments (Terms of Use)

Description Ian Macdonald 2003-06-03 01:13:33 UTC
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:

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-03 03:53:57 UTC
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 05:03:15 UTC
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 18:53:20 UTC
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.