delorie.com/archives/browse.cgi   search  
Mail Archives: cygwin/2000/07/18/13:00:35

Mailing-List: contact cygwin-help AT sourceware DOT cygnus DOT com; run by ezmlm
List-Subscribe: <mailto:cygwin-subscribe AT sources DOT redhat DOT com>
List-Archive: <http://sources.redhat.com/ml/cygwin/>
List-Post: <mailto:cygwin AT sources DOT redhat DOT com>
List-Help: <mailto:cygwin-help AT sources DOT redhat DOT com>, <http://sources.redhat.com/ml/#faqs>
Sender: cygwin-owner AT sources DOT redhat DOT com
Delivered-To: mailing list cygwin AT sources DOT redhat DOT com
From: "Randall Parker" <randall AT nls DOT net>
To: "Bob McGowan" <rmcgowan AT veritas DOT com>,
"Mike Little" <M DOT Little AT servicepower DOT com>
Cc: "cygwin AT sourceware DOT cygnus DOT com" <cygwin AT sourceware DOT cygnus DOT com>
Date: Tue, 18 Jul 2000 10:02:03 -0700
Reply-To: "Randall Parker" <randall AT nls DOT net>
X-Mailer: PMMail 98 Professional (2.01.1600) For Windows NT (4.0.1381;6)
MIME-Version: 1.0
Subject: Re: Where to put profile files?
Message-Id: <16591887585202@mail.nls.net>

Bob,

Yes, verified what you and Mike said. Thanks.  If I set the HOME variable in the environment then it will read .bashrc. But it still won't read the .bash_profile or .bash_login files. However, if I add the --
login on the line in cygwin.bat that executes bash then it reads the other files.

However, I still have a mystery: I can't get it to use the profile file in the etc directory. 

So how does it know which directory is the etc directory? Neither of these is getting executed:
   c:\etc\profile
   j:\prg\cygwin\etc\profile

Is there a different environment variable for where Bash's own home directory is located?


On Tue, 18 Jul 2000 09:36:58 -0700, Bob McGowan wrote:

>I believe it is necessary to edit the bash startup (batch file or
>shortcut...) and add the '--login' option, before bash will read any of
>the login related startup scripts.
>
>If you put everything in .bashrc at the place $HOME points, then the
>option is not needed.
>
>Mike Little wrote:
>> 
>> > -----Original Message-----
>> > From: Randall Parker [mailto:randall AT nls DOT net]
>> > Sent: Tuesday, July 18, 2000 7:06 AM
>> > To: cygwin AT sourceware DOT cygnus DOT com
>> > Subject: Where to put profile files?
>> >
>> >
>> > When I start up Bash from NT it opens in
>> >    c:\winnt\profiles\randall\desktop
>> >
>> > So I tried putting .bash_login and .bash_profile in it with
>> > just one line:
>> >  alias dir=ls
>> >
>> > This doesn't work. I tried putting a profile file with the
>> > same contents in the etc directory under
>> > where I have cygwin installed:
>> >   j:\prg\cygwin\etc\profile
>> >
>> > That doesn't make any difference either.
>> >
>> > I tried creating an etc directory on the c drive and putting
>> > profile in it too:
>> >    c:\etc\profile
>> >
>> > That doesn't help either.
>> >
>> > So I'm running out of ideas. Anyone know where the Cygwin
>> > Bash goes looking for profile,
>> > .bash_login, .bash_profile, and .bashrc?
>> >
>> 
>> Try setting $HOME before you run bash.
>> (i.e. set it in Control Panel->System->Environment)
>> I set mine to %SystemRoot%\Profiles\%USERNAME%\home
>> Which evaluates to C:\WINNT\Profiles\mlit\home.
>> 
>> The last sub-directory I created (the rest by NT). I have my
>> .bashrc and .bash_profile files in there (unix line endings)
>> 
>> If you have installed via the latest GUI installer the
>> /etc/profile file tries to be more sensible about it, and
>> will in fact create a home directory for you if $HOME is not defined.
>> 
>> Hope that helps.
>> 
>> Mike
>> 
>> --
>> Mike Little
>> Share what you know. Learn what you don't.
>> 
>> ServicePOWER Business Solutions Ltd
>> home: mike AT ampersoft DOT co DOT uk
>> 
>> 
>> --
>> Want to unsubscribe from this list?
>> Send a message to cygwin-unsubscribe AT sourceware DOT cygnus DOT com
>
>-- 
>Bob McGowan
>Staff Software Quality Engineer
>VERITAS Software
>rmcgowan AT veritas DOT com
>
>--
>Want to unsubscribe from this list?
>Send a message to cygwin-unsubscribe AT sourceware DOT cygnus DOT com
>




--
Want to unsubscribe from this list?
Send a message to cygwin-unsubscribe AT sourceware DOT cygnus DOT com

- Raw text -


  webmaster     delorie software   privacy  
  Copyright © 2019   by DJ Delorie     Updated Jul 2019