X-Recipient: archive-cygwin@delorie.com
X-SWARE-Spam-Status: No, hits=-0.4 required=5.0	tests=AWL,BAYES_05,RCVD_IN_DNSWL_NONE,TW_HR,TW_JW,TW_WZ
X-Spam-Check-By: sourceware.org
X-Yahoo-SMTP: Uu383n6swBCEN1G9up0WSnxbvN8fCPmk
Message-ID: <4D0A7E6F.9090502@cygwin.com>
Date: Thu, 16 Dec 2010 16:02:39 -0500
From: "Larry Hall \(Cygwin\)" <reply-to-list-only-lh@cygwin.com>
Reply-To: cygwin@cygwin.com
User-Agent: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.8.1.21) Gecko/20090320 Remi/2.0.0.21-1.fc8.remi Lightning/0.9 Thunderbird/2.0.0.21 Mnenhy/0.7.5.0
MIME-Version: 1.0
To: cygwin@cygwin.com
Subject: Re: Order of .profile & .bashrc
References: <30474750.post@talk.nabble.com> <0105D5C1E0353146B1B222348B0411A209B79593CD@NIHMLBX02.nih.gov> <30476188.post@talk.nabble.com>
In-Reply-To: <30476188.post@talk.nabble.com>
Content-Type: text/plain; charset=UTF-8; format=flowed
Content-Transfer-Encoding: 8bit
Mailing-List: contact cygwin-help@cygwin.com; run by ezmlm
List-Id: <cygwin.cygwin.com>
List-Subscribe: <mailto:cygwin-subscribe@cygwin.com>
List-Archive: <http://sourceware.org/ml/cygwin/>
List-Post: <mailto:cygwin@cygwin.com>
List-Help: <mailto:cygwin-help@cygwin.com>, <http://sourceware.org/ml/#faqs>
Sender: cygwin-owner@cygwin.com
Mail-Followup-To: cygwin@cygwin.com
Delivered-To: mailing list cygwin@cygwin.com

On 12/16/2010 3:42 PM, jwzumwalt wrote:
>
>
> http://tiswww.case.edu/php/chet/bash/bash.html#lbAH
>    or
> $ man bash
>    or
> $ info bash
>
> Thank you for your reply... No mention is made of the following files :)
>
> /etc/bash.bashrc
> /etc/skel/.bash_profile
> /etc/skel/.inputrc
> $HOME/.bash_profile - commands inside this file only get executed by the
> login shell.
> /etc/X11/xinit/xinitrc – executed when xwindows start, startup programs
>

 From the bash man page:

        When bash is invoked as an interactive login shell, or as a  non-inter‐
        active  shell with the --login option, it first reads and executes com‐
        mands 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.  The --noprofile option may be used when the
        shell is started to inhibit this behavior.

 From your ~/.bash_profile file:

# source the system wide bashrc if it exists
if [ -e /etc/bash.bashrc ] ; then
   source /etc/bash.bashrc
fi

Files under /etc/skel are templates that get copied into user home directories
when they are first accessed.

xinitrc is from X.  See "man xinit".

-- 
Larry

_____________________________________________________________________

A: Yes.
> Q: Are you sure?
>> A: Because it reverses the logical flow of conversation.
>>> Q: Why is top posting annoying in email?

--
Problem reports:       http://cygwin.com/problems.html
FAQ:                   http://cygwin.com/faq/
Documentation:         http://cygwin.com/docs.html
Unsubscribe info:      http://cygwin.com/ml/#unsubscribe-simple

