[3579] in RedHat Linux List

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

Re: .profile

daemon@ATHENA.MIT.EDU (Wierdl Mate)
Sat Nov 9 12:20:13 1996

To: Borg <"vladimip "@iceonline.com>, redhat-list@redhat.com
In-reply-to: Your message of "Fri, 08 Nov 1996 13:25:32 PST."
             <m0vLyQO-001G0HC@iceonline.com> 
Date: Sat, 09 Nov 1996 11:18:31 -0600
From: Wierdl Mate <matyi@wierdlmpc.msci.memphis.edu>
Resent-From: redhat-list@redhat.com
Reply-To: redhat-list@redhat.com

> 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...

~/.profile is supposed to be sourced by bash at startup; from the man page

       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.
                                    
But ~/.profile is sourced only at login. There could be the following 

1) You are experimenting in an xterm. Xterm usually is not run a login
shell. Maybe you want to start xterm as `xterm -ls'.

2) There is a syntax error in .profile you are experimenting with.

3) ~/.bash_profile exists

4) Maybe you reset variables in .bashrc.

To test that bash really sources .profile, why do not you make a
.profile with the two lines

	MYNAMEISTHIS=`whoami` 
	export MYNAMEISTHIS
Then either start an xterm as `xterm -ls' or flip to a VC, login and
do

	echo $MYNAMEISTHIS

You should get your username echoed.

If not, you have a problem. If the above experiment is OK, then the
problem is 2), and do a debugging. 

Mate

M\'at\'e Wierdl
Department of Mathematical Sciences
University of Memphis,
E-mail: matyi@moni.msci.memphis.edu


--
  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