delorie.com/archives/browse.cgi   search  
Mail Archives: djgpp/1999/01/07/02:12:28

Date: Thu, 7 Jan 1999 09:12:34 +0200 (IST)
From: Eli Zaretskii <eliz AT is DOT elta DOT co DOT il>
X-Sender: eliz AT is
To: "Raju K.V" <rajukv AT wipinfo DOT soft DOT net>
cc: jack AT st DOT rim DOT or DOT jp, djgpp AT delorie DOT com
Subject: Re: setting HOME does not work
In-Reply-To: <Pine.SV4.3.93.990107120202.4121A-100000@tagore>
Message-ID: <Pine.SUN.3.91.990107090713.16723J-100000@is>
MIME-Version: 1.0
Reply-To: djgpp AT delorie DOT com

On Thu, 7 Jan 1999, Raju K.V wrote:

> i set my HOME variable to c:\home\rajukv but everytime bash
> starts with directory c:\djgpp\bin which contains bash.exe.

What did you expect?  The HOME variable does NOT tell Bash what directory 
it should change to, it just tells it where to find the startup files, 
like .bashrc, .bash_login, etc.

The directory where Bash starts is the one where you were when you 
started it.  Bash doesn't automatically change the working directory. 

I'm guessing you are running Bash on Windows (you should always tell at 
least something about your system setup).  Windows has its own ideas 
about the directory where it starts programs.  By default it starts them 
either in the directory they live or inside C:\WINDOWS.

One way to make Bash chdir to HOME is to a suitable line into the .bashrc 
file.  Another way is to change the Windows property sheets of bash.exe 
so that the startup directory is where you want it.

- Raw text -


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