[3467] in RedHat Linux List

home help back first fref pref prev next nref lref last post

Re: .profile

daemon@ATHENA.MIT.EDU (Alan Shutko)
Fri Nov 8 17:10:34 1996

To: redhat-list@redhat.com
From: Alan Shutko <ats@wydo125.wustl.edu>
Date: 08 Nov 1996 15:59:33 -0600
In-Reply-To: Borg's message of Fri, 08 Nov 1996 13:25:32 -0800
Resent-From: redhat-list@redhat.com
Reply-To: redhat-list@redhat.com

>>>>> "B" == Borg  <"vladimip "@iceonline.com> writes:

B> Daniel Chalef wrote:
>>  Hi all
>> 
>> My ~user/.profile files are not being executed by bash. This is
>> extremely annoying, and as yet, I have yet to work out why...
>> 
>> Has anybody had any similar experiences with RH4.0? This happens on
>> two machines, both standard colgate.

B> Yeah right. Mine isn't executed either and I think that's because
B> the proper files are:

B> .bash_profile .bashrc

B> So, you should rename your .profile to one of the above.  (I am not
B> sure which one).

Actually, no.

I'm including a bit of the man page below.  Bash does source .profile
if it is a login interactive shell.  If it is not sourcing .profile,
you don't have a login shell.  This most often happens when you are
using an xterm.  The man page for xterm shows how to make xterm get a
login shell.

There is no bug with Colgate, since my .profile is sourced fine.


From the manpage:

       Login shells:
         On login (subject to the -noprofile option):
               if /etc/profile exists, source it.

               if ~/.bash_profile exists, source it,
                 else if ~/.bash_login exists, source it,
                   else if ~/.profile exists, source it.

         On exit:
               if ~/.bash_logout exists, source it.

       Non-login interactive shells:
         On startup (subject to the -norc and -rcfile options):
               if ~/.bashrc exists, source it.

       Non-interactive shells:
         On startup:
               if the environment variable ENV is non-null, expand
               it and source the file it names, as if the command
                       if [ "$ENV" ]; then . $ENV; fi
               had been executed, but do not use PATH to search
               for the pathname.  When not started in Posix mode, bash
               looks for BASH_ENV before ENV.

--
Alan Shutko <ats@hubert.wustl.edu> - The Few, the Proud, the Remaining.
There's got to be more to life than compile-and-go.


--
  PLEASE read the Red Hat FAQ, Tips, Errata and the MAILING LIST ARCHIVES!
  ________________________________________________________________________
  http://www.redhat.com/RedHat-FAQ   http://www.redhat.com/RedHat-Errata
  http://www.redhat.com/RedHat-Tips  http://www.redhat.com/mailing-lists
  ------------------------------------------------------------------------
To unsubscribe: mail -s unsubscribe redhat-list-request@redhat.com < /dev/null


home help back first fref pref prev next nref lref last post