Bug 191233 - make tcsh behave like bash
make tcsh behave like bash
Product: Red Hat Enterprise Linux 4
Classification: Red Hat
Component: setup (Show other bugs)
All Linux
medium Severity medium
: ---
: ---
Assigned To: Phil Knirsch
David Lawrence
Depends On:
Blocks: 434561
  Show dependency treegraph
Reported: 2006-05-09 18:01 EDT by Jack Neely
Modified: 2015-03-04 20:16 EST (History)
2 users (show)

See Also:
Fixed In Version: RHBA-2008-0130
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Last Closed: 2008-03-05 07:30:42 EST
Type: ---
Regression: ---
Mount Type: ---
Documentation: ---
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---

Attachments (Terms of Use)

External Trackers
Tracker ID Priority Status Summary Last Updated
Red Hat Product Errata RHBA-2008:0130 normal SHIPPED_LIVE setup bug fix and enhancement update 2008-07-23 17:57:38 EDT

  None (edit)
Description Jack Neely 2006-05-09 18:01:47 EDT
Description of problem:

When bash starts up as the user's default shell it executes /etc/profile and
hence /etc/profile.d/*.sh.  For non-login shells (say bash -c "echo FOO")
/etc/profile and /etc/profile.d/*.sh are NOT executed.  This is the expected

Users that use tcsh as their default shell do not behave in the same way.  The
scripts /etc/profile.d/*.csh are executed for ALL shells.  This is because the
/etc/profile.d/*.csh files are sourced from /etc/csh.cshrc.  They SHOULD be
sourced from /etc/csh.login instead.

This bug is present in all versions of RHEL and Fedora Core.

To reproduce:

1. Create a file "test.csh" (755) in /etc/profile.d containing:
echo "FOO"

2. Login as a user with tcsh as the default shell.  You'll note that "FOO"
appears on your display.

3. Execute a non-login tcsh shell by running: 

   tcsh -c "echo BAR"

The following appears on your screen:


The expected result should be:

Comment 2 Burt Holzman 2007-05-29 12:48:03 EDT
FYI, this inconsistency affected us here recently -- a command was added to
/etc/profile.d (aklog) which was appropriate for login shells, but not for
non-login shells (which get spawned by 'less', for instance).

As Jack suggested, /etc/profile.d/*.csh should get sourced from csh.login (or
should be wrapped with an if ( ${?loginsh} ).
Comment 3 Phil Knirsch 2008-02-22 11:35:43 EST
Suggesting for RHEL-4.8 with Devel ACK.

Read ya, Phil
Comment 4 Phil Knirsch 2008-02-22 12:05:29 EST
Still in RHEL-4.7 planing, so reflagging for RHEL-4.7

Read ya, Phil

Comment 5 RHEL Product and Program Management 2008-02-22 12:08:34 EST
This request was evaluated by Red Hat Product Management for
inclusion, but this component is not scheduled to be updated in
the current Red Hat Enterprise Linux release. If you would like
this request to be reviewed for the next minor release, ask your
support representative to set the next rhel-x.y flag to "?".
Comment 11 errata-xmlrpc 2008-03-05 07:30:42 EST
An advisory has been issued which should help the problem
described in this bug report. This report is therefore being
closed with a resolution of ERRATA. For more information
on the solution and/or where to find the updated files,
please follow the link below. You may reopen this bug report
if the solution does not work for you.


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