SUMMARY: GNU Bash on Solaris 7

Date: Tue Aug 31 1999 - 10:54:28 CDT

The ones who were right are: Anand Buddhdev and Bill Bartlett. Thanks a lot.
See the answers below.

No. 1
When a terminal windows is lauched, it does not start a login shell, so
bash will not read the .profile file. A console window on the other hand
runs a login shell, so bash will read .profile. If you want a command to
be executed by bash everytime, whether it is a login shell or not, put
that command into .bashrc. This is no bug in bash. It's just the way
bash was designed.

This isn't necessarily a bug, but in my expierence if there is no .bashrc,
a CDE terminal does not read the enviroment. When you use the console,
it's reading the users' enviroment, and by default if there is no ~/.(init
file) here, then it reads from /etc/profile.. obviously. I would suggest
perhaps trying to link the .bashrc to the /etc/profile in each of the
users' home directories.. a bit tedious I know, but not sure how else to
fix this. Or, if you really dont mind for the disk space that it possibly
can take up, you can copy the /etc/profile to each ~/.bashrc. Let me know
if any of this helps.

Original question:
> Hello, Sunmanagers!
> I installed GNU Bash v. 2.03 on my Ultra1 with Solaris7.
> I configured BASH as the default shell for certain users. I modified the PATH
> variable in /etc/profile.
> However, when a user logs on and open a Terminal window, the PATH is not as I
> wanted.
> If the user opens a Console window, everything is OK.
> There are no .profile, .bash_profile or other initialization files in the user
> home directory. The .dtprofile has the
> DTSOURCEPROFILE=true uncommented to allow processing of dot-files.
> If I run from in the Terminal window
> bash --login
> the PATH is set correctly.
> If I change the default shell to sh, everything is working fine, both in
> Terminal and Console.
> This is the way I set the PATH in /etc/profile is
> PATH=/usr/local/bin:$SYBASE/bin:$PATH
> export PATH
> And in the man page for BASH I found that
> "When bash is invoked as an interactive login shell, or as a
> non-interactive shell with the --login option, it first
> reads and executes commands from the file /etc/profile, if
> that file exists. After reading that file, it looks for
> ~/.bash_profile, ~/.bash_login, and ~/.profile, in that
> order, and reads and executes commands from the first one
> that exists and is readable."
> Any ideas about that? Is there a bug of BASH?
> Thanks,
> Florentin Albu

This archive was generated by hypermail 2.1.2 : Fri Sep 28 2001 - 23:13:25 CDT