/etc/bash.bashrc prints error message when bash invoked from csh
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
Linux Mint |
Fix Released
|
Undecided
|
Unassigned |
Bug Description
On mint 17.2 I use tcsh as my login shell. If I explicitly invoke bash for some purpose, an error message is printed as shown:
tcsh: echo $SHELL
/bin/tcsh
tcsh: bash
bash: setenv: command not found
rfw@rfwmint:~$
Bash does startup, but the error message should not be printed. Furthermore the LS_COLORS setting is not as intended.
This always occurs when a user whose login shell is from the csh family invokes bash.
The solution: line 60 of /etc/bash.bashrc needs to specify the -b option for dircolors, Since the user's $SHELL environment variable indicates their login shell, which may not be bash-compatible, so the default dircolors behavior will be incorrect.
I would format this properly as a git patch but I can't find the package from which /etc/bash.bashrc is installed on mint 17.2. apt-file search /etc/bash.bashrc indicates the source is the bash package, but the file packaged in the bash package is considerably different - 68 lines vs. 142 lines.
Therefore, simply content diff output is attached as a patch.
Fix planned for Mint 19 / LMDE 3.