Mailing-List: contact cygwin-help AT cygwin DOT com; run by ezmlm List-Subscribe: List-Archive: List-Post: List-Help: , Sender: cygwin-owner AT cygwin DOT com Mail-Followup-To: cygwin AT cygwin DOT com Delivered-To: mailing list cygwin AT cygwin DOT com X-Authentication-Warning: slinky.cs.nyu.edu: pechtcha owned process doing -bs Date: Sun, 26 Jan 2003 00:15:31 -0500 (EST) From: Igor Pechtchanski Reply-To: cygwin AT cygwin DOT com To: David Christensen cc: cygwin AT cygwin DOT com Subject: Re: Cygwin 1.3.19 Windows 2000 Professional SP3 bash $home /usr/bin/%USERPROFILE% In-Reply-To: <008b01c2c4f8$6fdd9000$0b01a8c0@w2k30g> Message-ID: Importance: Normal MIME-Version: 1.0 Content-Type: TEXT/PLAIN; CHARSET=US-ASCII Content-ID: David, Wow, you've really done your homework :-D Apparently, Dia has reset your HOME environment variable. The default /etc/profile sets HOME only if it's not set before, and since Cygwin processes inherit the Windows environment, well... In any case, uninstallers rarely change back the environment variables that they munge. Thus, you could a) go to Start->Settings->Control Panels->System and delete your HOME environment variable (no doubt breaking Dia if it's still installed), or b) edit your /etc/profile and comment out the line containing 'if [ -z "$HOME" ]; then' and the corresponding 'fi'. If you're feeling unsure about changing /etc/profile, you could instead change that conditional to 'if [ -z "$HOME" -o "$HOME" = "/usr/bin/%USERPROFILE%"]; then', just to ignore the change Dia made. Igor On Sat, 25 Jan 2003, David Christensen wrote: > cygwin AT cygwin DOT com: > > I have been using Cygwin on Win2k Pro SP3 for a while now, and really > like it. Today, I downloaded and installed Dia Win32 Installer. The > next time I started Bash, it was broken -- the prompt spans two (three?) > lines, Bash starts in the wrong directory, and $HOME environment is > wrong: > > dpchrist AT w2k30g ~ > $ pwd > /usr/bin/%USERPROFILE% > > dpchrist AT w2k30g ~ > $ echo $HOME > /usr/bin/%USERPROFILE% > > > Initially, I thought this was a Dia problem. Uninstalling Dia did not > fix it. I tried reinstalling Bash with no luck. I don't know how to > get at the Cygwin DLL, so I couldn't try that. Moving aside the > C:\cygwin directory and reinstalling Cygwin didn't fix it. > > Searching the archive for this mailing list, my query of > "/usr/bin/%USERPROFILE%" was converted into "usr and (bin or bins) and > userprofile and ", yielding 644 hits. I was unable to figure out how to > search on an exact phrase. > > An advanced Google search was more productive: > > http://www.cygwin.com/ml/cygwin/2002-11/msg00764.html > > http://www.cygwin.com/ml/cygwin/2002-11/msg00766.html > > Browsing the archives for this mailing list and searching back through > the months for "/usr/bin/%USERPROFILE%" with my browser, I found the > following in November of 2002: > > http://cygwin.com/ml/cygwin/2002-11/msg00809.html > http://cygwin.com/ml/cygwin/2002-11/msg00766.html > http://cygwin.com/ml/cygwin/2002-11/msg00764.html > http://cygwin.com/ml/cygwin/2002-11/msg00761.html > http://cygwin.com/ml/cygwin/2002-11/msg00759.html > > Per the posting by Michael Caplan of Thu, 14 Nov 2002 14:23:52 -0500, I > am experiencing the same problem. His Cygnus DLL was 1.3.15, mine is > 1.3.19. I haven't compared versions of the various packages. > > Per the posting by Harig, Mark A. of Date: Thu, 14 Nov 2002 > 15:17:21 -0500, I have attached the output of "cygcheck -s" as a file > (cygcheck.txt) rather than including it here. > > Per the posting of Harig, Mark A. of Date: Thu, 14 Nov 2002 > 15:30:12 -0500: > > 1. Output of the "id" command is as follows: > > dpchrist AT w2k30g ~ > $ id > uid=1000(dpchrist) gid=513(None) groups=513(None),544(Administrators),545(Users) > > Output of the "id -un" command is as follows: > > dpchrist AT w2k30g ~ > $ id -un > dpchrist > > 2. I have made no changes whatsoever to the default Cygwin install of > today, including /etc/passwd. Permissions and ownership of this file > are as follows: > > dpchrist AT w2k30g ~ > $ ls -l /etc/passwd > -rw-r--r-- 1 dpchrist None 749 Jan 25 18:57 /etc/passwd > > Permission and ownership of /etc is as follows: > > dpchrist AT w2k30g ~ > $ ls -ld /etc > drwxr-xr-x 5 dpchrist None 0 Jan 25 18:53 /etc > > 3. I am launching Bash using the desktop shortcut created by Cygwin > setup. This shortcut points to C:\cygwin\cygwin.bat. Permissions and > ownership are as follows: > > dpchrist AT w2k30g ~ > $ ls -l /cygwin.bat > -rwxr-xr-x 1 dpchrist None 57 Jan 25 18:57 /cygwin.bat > > I have made no changes whatsoever to this file, which contains: > > @echo off > > C: > chdir C:\cygwin\bin > > bash --login -i > > I have made no changes whatsoever to /etc/profile, also attached. > Permissions and ownerships are as follows: > > dpchrist AT w2k30g ~ > $ ls -l /etc/profile > -rw-r--r-- 1 dpchrist None 386 Jan 25 18:57 /etc/profile > > Bash is not finding my home directory (/home/dpchrist), so I am > omitting ~/.bashrc, ~/.bash_profile, and ~/.profile. > > Per the posting by Michael Caplan of Thu, 14 Nov 2002 16:08:25 -0500, I > am leery of hacking /etc/profile and have not done so. The default file > installed by Cygwin setup is attached for those so inclined. > > Per the posting of Harig, Mark A. of Date: Fri, 15 Nov 2002 > 11:50:39 -0500: > > 1. Permissions and ownership of /etc/password are as follows: > > dpchrist AT w2k30g ~ > $ ls -l /etc/passwd > -rw-r--r-- 1 dpchrist None 749 Jan 25 18:57 /etc/passwd > > The relevant line is as follows: > > dpchrist:unused_by_nt/2000/xp:1000:513:David Christensen,U-W2K30G\dpchrist,S-1-5-21-1229272821-1202660629-1060284298-1000:/home/dpchrist:/bin/bash > > The last two entries look correct. > > 2. Permissions and ownership of /etc are given above. Permissions are > already 0755. > > Can someone please tell me how to fix the problem? > > TIA, > > David Christensen > dpchrist AT holgerdanske DOT com -- http://cs.nyu.edu/~pechtcha/ |\ _,,,---,,_ pechtcha AT cs DOT nyu DOT edu ZZZzz /,`.-'`' -. ;-;;,_ igor AT watson DOT ibm DOT com |,4- ) )-,_. ,\ ( `'-' Igor Pechtchanski '---''(_/--' `-'\_) fL a.k.a JaguaR-R-R-r-r-r-.-.-. Meow! Oh, boy, virtual memory! Now I'm gonna make myself a really *big* RAMdisk! -- /usr/games/fortune -- Unsubscribe info: http://cygwin.com/ml/#unsubscribe-simple Bug reporting: http://cygwin.com/bugs.html Documentation: http://cygwin.com/docs.html FAQ: http://cygwin.com/faq/