This is the mail archive of the cygwin mailing list for the Cygwin project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: .bashrc is ignored


Hoss wrote:
> I'm a newbie to cygwin and I'm trying to setup .bashrc to start when I launch
> a cygwin terminal (using rxvt in fact).  my .bashrc is ignored which I think
> is because the %HOME% environment variable is not set *before* I run
> bash/rxvt.
> When I do set it, it simply causes bash to create new directories.  Basically
> I'm not sure whether %HOME% (a windows environment variable) should be set in
> Windows or POSIX format, and how to quote the string or escape spaces in
> either case - I'm trying to make sure my home directory is the same as my
> windows profile directory (done this) and that bash recognises this as the
> location to find .bashrc.
Hello Hoss,

Could you please provide a bit more information, such as:
* the contents of your cygwin.bat file (or rather: how you invoke rxvt and make
  it invoke Bash
* the result of typing ``echo $HOME'' (without the quotes) on the Bash command-
  line.
* the output of cygcheck as described at http://cygwin.com/problems.html 
  (attached, not in-line)

I.e., there's not enough information in your mail to know how to help you: it 
could be that your HOME variable is not set correctly, though your mention of
the fact that your home directory actually is the directory you want it to be
does not support that; it could also be that you don't invoke Bash correctly for
it to read your ~/.bashrc file - i.e. ~/.bashrc is only read if the shell is not
a login shell (i.e. the option ``--login'' is not used) and it is interactive 
(and the option ``--no-rc'' is not used either).

If the shell you're using is a login shell, the file Bash looks for is 
~/.profile, which *usually* (but by no means always) sources the ~/.bashrc file,
but it is up to the user to make it so.

More details about how Bash behaves when it starts up and which files it reads
can be found in the INVOCATION section in Bash' manpage.

rlc

Attachment: pgp00000.pgp
Description: PGP signature


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]