From: weiku@utkux.utcc.utk.edu (Wei Ku)
Subject: Re: /etc/profile ignored; other strangeness
28 Jan 1998 19:53:23 -0800
Message-ID: <001101bd2c25$e2fee690$3916a980.cygnus.gnu-win32@wku1.utk.edu>
Mime-Version: 1.0
Content-Type: text/plain;
	charset="iso-8859-1"
Content-Transfer-Encoding: 7bit
To: "Tim Fisher" <tfisher@teamparadigm.com>
Cc: <gnu-win32@cygnus.com>

-----Original Message-----
From: Tim Fisher <tfisher@teamparadigm.com>
To: gnu-win32@cygnus.com <gnu-win32@cygnus.com>
Date: Wednesday, January 28, 1998 5:05 AM
Subject: /etc/profile ignored; other strangeness


>I have three questions, but they're all sort of related so here goes:
>
>1) Seems like bash ignores /etc/profile, so I have to explicitly source it
from
>the /etc/bashrc file. I don't have to do this in Linux. Is this by design,
or
>am I doing something wrong here?
>


Only the login shell of bash read the profile. When invoke bash, mke it a
log in shell by:
   bash -login

>2) My PS1 variable is set to PS1="[\u@\h \W]\\$ " but when bash first
starts
>up, the \W defaults to nil. It will update only if I change directories,
and
>then I get some strange behavior. This occurs only after first starting up
>bash. After 'cd'ing around a bit, it settles down:
>

>[Administrator@CALIBAN ]$ cd usr
>[Administrator@CALIBAN usr]$ pwd
>./usr
>[Administrator@CALIBAN usr]$ cd incoming
>[Administrator@CALIBAN /incoming]$ pwd
>/incoming
>[Administrator@CALIBAN /incoming]$ cd /usr
>[Administrator@CALIBAN /usr]$ cd incoming
>[Administrator@CALIBAN incoming]$ pwd
>/usr/incoming
>[Administrator@CALIBAN incoming]$
>


I tried this and it workd: PS1='[\u@\h \W]\$ '

>BTW, I have two partitions, one is mounted on /usr, the other on /. Both
>filesystems have a root directory called `incoming', so if my current
directory
>is /usr, then a `cd incoming' should get me to /usr/incoming, not
/incoming.
>What is going on here?
>


Define HOME in file .bash_profile ( or profile ). ex:

   export HOME=/usr/Administrator

then use cd to go to home directory:

   cd

you will be OK.

>--Tim Fisher
>
>-
>For help on using this list (especially unsubscribing), send a message to
>"gnu-win32-request@cygnus.com" with one line of text: "help".



Wei Ku

-
For help on using this list (especially unsubscribing), send a message to
"gnu-win32-request@cygnus.com" with one line of text: "help".
