This is the mail archive of the
mailing list for the Cygwin project.
RE: home directory
- From: "Green, Keith" <KGreen at ida dot org>
- To: <cygwin at cygwin dot com>
- Date: Thu, 20 Jan 2005 14:03:17 -0500
- Subject: RE: home directory
> On Wed, 19 Jan 2005, Green, Keith wrote:
> > New problem. Never had this one before.
> > In Windows, I define the HOME variable to C:\etc.
> > However, my cygwin.bat file reads
> > @echo off
> > set HOME=/home/kgreen (also tried set
> HOME=H:\cygwin\home\kgreen )
> > H:
> > chdir H:\cygwin\bin
> > bash --login -i
> > and the pertinent line from /etc/passwd reads:
> > BUT ... when I double click on icon (cygwin.bat), it keeps
> bringing me
> > up in /usr/bin.
> > I've tried disabling ~/.bashrc and ~/.bash_login (just in
> case). Same
> > thing.
> > The odd thing is that in the cygwin.bat file, regardless of
> how I set it
> > (with POSIX or DOS path name), when the cygwin window comes up and I
> > type echo $HOME, it has the right value in it. That is, $HOME says
> > /home/kgreen.
> > Also, when I put a ~/.bashrc and ~/.bash_login inside
> /home/kgreen, it
> > uses them! So it's getting there somehow ... and then
> deciding on its
> > own that it would rather be in /usr/bin!
> You could try to start bash with "--login -i -v", which
> should show the
> commands that are executed, and possibly explain why the directory is
> changed to /usr/bin.
Igor, I tried that. No new information. Strange thing indeed.
Last line of my .bash_profile reads
echo "Inside .bash_profile $HOME"
When it gets to that line it prints the line (because of -v) and
then executes the line ... the value for $HOME is correct (/home/kgreen).
Immediately following that line is the prompt (because the login is complete).
At that point my directory is /usr/bin.
Unsubscribe info: http://cygwin.com/ml/#unsubscribe-simple
Problem reports: http://cygwin.com/problems.html