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 Message-ID: From: "Bryant, Neil" To: "'cygwin AT cygwin DOT com'" Subject: 1.5.11 on XP: spaces in HOME and my resolution Date: Tue, 14 Sep 2004 17:10:02 -0400 MIME-Version: 1.0 Content-Type: multipart/mixed; boundary="----_=_NextPart_000_01C49A9F.338AD2B0" X-OriginalArrivalTime: 14 Sep 2004 21:10:04.0133 (UTC) FILETIME=[344FA950:01C49A9F] ------_=_NextPart_000_01C49A9F.338AD2B0 Content-Type: text/plain I just downloaded and installed the latest (2 days old, at the time I write this) version of Cygwin. I had several issues relating back to my Home directory having spaces from my XP profile; mostly from external apps such as KDE. I expect this is known, and I have looked it up in the archives and in Google, but whether or not there is curently a resolution is not clear. Below is my fix in the hopes that it is helpful (I couldn't find anything similar as I searched.) First, however, it appears that this is not supposed to be the standard behavior. According to this post: http://www.cygwin.com/ml/cygwin/2003-01/msg00111.html it seems that this behavior is attributed to a HOME directory being set in the environment. In my case, this is not so, as you can see from the attached cygcheck output. If I install cygwin and run Bash on a clean machine, the path with spaces is already set in etc/passwd as below, so I changed it to the short filename version and that fixed most of the issues I was having. NBRYANT:unused_by_nt/2000/xp:198884:10545:NBRYANT,U-WFBS\NBRYANT,S-1-5-21-[r emoved]:/cygdrive/c/Documents and Settings/NBRYANT:/bin/bash In the archives, I found mention that setting this in the cygwin.bat file is a bad idea because of the possibility of mixing up docume~1 and docume~2, etc. If this is the only issue with short file names, then I submit my modified cygwin.bat file. ============================================================================ == @echo off IF NOT DEFINED HOME ( for %%x IN (%USERPROFILE%) DO (set HOME=%%x) if NOT "%HOME%"=="%USERPROFILE%" ( if "%OS%"=="Windows_NT" ( for /D %%x IN ("%USERPROFILE%") DO (set HOME=%%~fsx) ) ) ) C: chdir C:\cygwin\bin bash --login -i %1 ============================================================================ == This will set the HOME variable in the shell to the shortfilename version of %USERPROFILE% and should work in any version of NT (I've only tried it in XP, and it works just fine.) It cleared up my issues with KDE and other software instantly. I typed this up only in the hopes of contributing something to your excellent project ... if it is counterproductive or actually has been addressed, I apologize. On the other hand, if it would be helpful, you are free to use it; I wrote it, it's mine, and I give it to you. If there is interest, I should be able to expand it to '95/'98 (which you have to shorten a different way). Actually, while I'm at it, this should work for all versions (again, I've only tested it on XP. ============================================================================ == @echo off C: chdir C:\cygwin\bin IF NOT DEFINED HOME ( for %%x IN (%USERPROFILE%) DO (set HOME=%%x) if NOT "%HOME%"=="%USERPROFILE%" ( if "%OS%"=="Windows_NT" ( for /D %%x IN ("%USERPROFILE%") DO (set HOME=%%~fsx) ) ELSE ( REM For Win9x, etc cygpath -d "%USERPROFILE%"| cat -b > sethome.bat echo set HOME=%%1>1.bat call sethome.bat del sethome.bat del 1.bat ) ) ) bash --login -i %1 ============================================================================ == Incidentally, the %1 in the last line allows me to run shell scripts directly from Win shortcuts, but does not affect normal execution: ie, since the startx.bat files won't show the background when windowed, my shortcut is thus: C:\cygwin\cygwin.bat C:\cygwin\usr\X11R6\bin\kde.sh But when the desktop Cygwin icon is launched, it functions as always. ~Neil ------_=_NextPart_000_01C49A9F.338AD2B0 Content-Type: text/plain; name="cygcheck.txt" Content-Transfer-Encoding: quoted-printable Content-Disposition: attachment; filename="cygcheck.txt" Cygwin Configuration Diagnostics Current System Time: Mon Sep 13 12:28:07 2004 Windows XP Professional Ver 5.1 Build 2600 Service Pack 1 Path: C:\cygwin\usr\local\bin C:\cygwin\bin C:\cygwin\bin C:\cygwin\usr\X11R6\bin c:\WINDOWS\system32 c:\WINDOWS c:\WINDOWS\System32\Wbem c:\Program Files\NetManage\Windows c:\Program Files\Compuware\Common .\ Output from C:\cygwin\bin\id.exe (nontsec) UID: 198884(NBRYANT) GID: 10545(mkgroup-l-d) 10545(mkgroup-l-d) Output from C:\cygwin\bin\id.exe (ntsec) UID: 198884(NBRYANT) GID: 10545(mkgroup-l-d) 0(root) 544(Administrators)=20=20 547(Power Users) 545(Users) 10545(mkgroup-l-d) SysDir: C:\WINDOWS\System32 WinDir: C:\WINDOWS HOME =3D `c:\Documents and Settings\NBRYANT' MAKE_MODE =3D `unix' PWD =3D `/cygdrive/c/Documents and Settings/NBRYANT/desktop/new folder' USER =3D `NBRYANT' ALLUSERSPROFILE =3D `C:\Documents and Settings\All Users' APPDATA =3D `C:\Documents and Settings\NBRYANT\Application Data' CLASSPATH =3D `C:\Classpath\swingall.jar' CLIENTNAME =3D `Console' COMMONPROGRAMFILES =3D `C:\Program Files\Common Files' COMPUTERNAME =3D `DWS1257-B9KW141' COMSPEC =3D `C:\WINDOWS\system32\cmd.exe' CVS_RSH =3D `/bin/ssh' HOMEDRIVE =3D `C:' HOMEPATH =3D `\Documents and Settings\NBRYANT' HOSTNAME =3D `DWS1257-B9KW141' INFOPATH =3D `/usr/local/info:/usr/info:/usr/share/info:/usr/autotool/devel= /info:/usr/autotool/stable/info:' LOGONSERVER =3D `\\[removed]' MANPATH =3D `/usr/local/man:/usr/man:/usr/share/man:/usr/autotool/devel/man= :' NUMBER_OF_PROCESSORS =3D `1' OLDPWD =3D `/cygdrive/c/Documents and Settings/NBRYANT/desktop' OS =3D `Windows_NT' PATHEXT =3D `.COM;.EXE;.BAT;.CMD;.VBS;.VBE;.JS;.JSE;.WSF;.WSH' PRINTER =3D `ActiveTouch Document Loader' PROCESSOR_ARCHITECTURE =3D `x86' PROCESSOR_IDENTIFIER =3D `x86 Family 15 Model 2 Stepping 7, GenuineIntel' PROCESSOR_LEVEL =3D `15' PROCESSOR_REVISION =3D `0207' PROGRAMFILES =3D `C:\Program Files' PROMPT =3D `$P$G' PS1 =3D `\[\033]0;\w\007 \033[32m\]\u@\h \[\033[33m\w\033[0m\] $ ' SESSIONNAME =3D `Console' SHLVL =3D `1' SYSTEMDRIVE =3D `C:' SYSTEMROOT =3D `C:\WINDOWS' TEMP =3D `C:\DOCUME~1\NBRYANT\LOCALS~1\Temp' TERM =3D `cygwin' TMP =3D `C:\DOCUME~1\NBRYANT\LOCALS~1\Temp' USERDOMAIN =3D `WFBS' USERNAME =3D `NBRYANT' USERPROFILE =3D `C:\Documents and Settings\NBRYANT' WINDIR =3D `C:\WINDOWS' _ =3D `/usr/bin/cygcheck' POSIXLY_CORRECT =3D `1' HKEY_CURRENT_USER\Software\Cygnus Solutions HKEY_CURRENT_USER\Software\Cygnus Solutions\Cygwin HKEY_CURRENT_USER\Software\Cygnus Solutions\Cygwin\mounts v2 HKEY_CURRENT_USER\Software\Cygnus Solutions\Cygwin\Program Options HKEY_LOCAL_MACHINE\SOFTWARE\Cygnus Solutions HKEY_LOCAL_MACHINE\SOFTWARE\Cygnus Solutions\Cygwin HKEY_LOCAL_MACHINE\SOFTWARE\Cygnus Solutions\Cygwin\mounts v2 (default) =3D `/cygdrive' cygdrive flags =3D 0x00000022 HKEY_LOCAL_MACHINE\SOFTWARE\Cygnus Solutions\Cygwin\mounts v2\/ (default) =3D `C:\cygwin' flags =3D 0x0000000a HKEY_LOCAL_MACHINE\SOFTWARE\Cygnus Solutions\Cygwin\mounts v2\/usr/bin (default) =3D `C:\cygwin/bin' flags =3D 0x0000000a HKEY_LOCAL_MACHINE\SOFTWARE\Cygnus Solutions\Cygwin\mounts v2\/usr/lib (default) =3D `C:\cygwin/lib' flags =3D 0x0000000a HKEY_LOCAL_MACHINE\SOFTWARE\Cygnus Solutions\Cygwin\Program Options a: fd N/A N/A=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20= =20=20=20=20 c: hd NTFS 38138Mb 15% CP CS UN PA FC=20=20=20=20=20 d: cd N/A N/A=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20= =20=20=20=20 C:\cygwin / system binmode C:\cygwin/bin /usr/bin system binmode C:\cygwin/lib /usr/lib system binmode . /cygdrive system binmode,cygdrive Found: C:\cygwin\bin\awk.exe Found: C:\cygwin\bin\bash.exe Found: C:\cygwin\bin\cat.exe Found: C:\cygwin\bin\cp.exe Not Found: cpp (good!) Found: C:\cygwin\bin\find.exe Not Found: gcc Not Found: gdb Found: C:\cygwin\bin\grep.exe Not Found: ld Found: C:\cygwin\bin\ls.exe Not Found: make Found: C:\cygwin\bin\mv.exe Found: C:\cygwin\bin\rm.exe Found: C:\cygwin\bin\sed.exe Found: C:\cygwin\bin\sh.exe Found: C:\cygwin\bin\tar.exe 61k 2003/08/09 C:\cygwin\bin\cygbz2-1.dll - os=3D4.0 img=3D1.0 sys=3D4.0 "cygbz2-1.dll" v0.0 ts=3D2003/8/9 2:35 45k 2001/04/25 C:\cygwin\bin\cygform5.dll - os=3D4.0 img=3D1.0 sys=3D4.0 "cygform5.dll" v0.0 ts=3D2001/4/25 1:28 35k 2002/01/09 C:\cygwin\bin\cygform6.dll - os=3D4.0 img=3D1.0 sys=3D4.0 "cygform6.dll" v0.0 ts=3D2002/1/9 1:03 48k 2003/08/09 C:\cygwin\bin\cygform7.dll - os=3D4.0 img=3D1.0 sys=3D4.0 "cygform7.dll" v0.0 ts=3D2003/8/9 5:25 28k 2003/07/20 C:\cygwin\bin\cyggdbm-3.dll - os=3D4.0 img=3D1.0 sys=3D4.0 "cyggdbm-3.dll" v0.0 ts=3D2003/7/20 3:58 30k 2003/08/11 C:\cygwin\bin\cyggdbm-4.dll - os=3D4.0 img=3D1.0 sys=3D4.0 "cyggdbm-4.dll" v0.0 ts=3D2003/8/10 22:12 19k 2003/03/22 C:\cygwin\bin\cyggdbm.dll - os=3D4.0 img=3D1.0 sys=3D4.0 "cyggdbm.dll" v0.0 ts=3D2002/2/19 22:05 15k 2003/07/20 C:\cygwin\bin\cyggdbm_compat-3.dll - os=3D4.0 img=3D1.0 s= ys=3D4.0 "cyggdbm_compat-3.dll" v0.0 ts=3D2003/7/20 4:00 15k 2003/08/11 C:\cygwin\bin\cyggdbm_compat-4.dll - os=3D4.0 img=3D1.0 s= ys=3D4.0 "cyggdbm_compat-4.dll" v0.0 ts=3D2003/8/10 22:13 107k 2004/07/06 C:\cygwin\bin\cyggettextlib-0-14-1.dll - os=3D4.0 img=3D1= .0 sys=3D4.0 "cyggettextlib-0-14-1.dll" v0.0 ts=3D2004/7/6 13:56 17k 2004/07/06 C:\cygwin\bin\cyggettextpo-0.dll - os=3D4.0 img=3D1.0 sys= =3D4.0 "cyggettextpo-0.dll" v0.0 ts=3D2004/7/6 13:56 190k 2004/07/06 C:\cygwin\bin\cyggettextsrc-0-14-1.dll - os=3D4.0 img=3D1= .0 sys=3D4.0 "cyggettextsrc-0-14-1.dll" v0.0 ts=3D2004/7/6 13:56 17k 2001/06/28 C:\cygwin\bin\cyghistory4.dll - os=3D4.0 img=3D1.0 sys=3D= 4.0 "cyghistory4.dll" v0.0 ts=3D2001/1/6 23:34 29k 2003/08/10 C:\cygwin\bin\cyghistory5.dll - os=3D4.0 img=3D1.0 sys=3D= 4.0 "cyghistory5.dll" v0.0 ts=3D2003/8/10 19:16 991k 2004/07/06 C:\cygwin\bin\cygiconv-2.dll - os=3D4.0 img=3D1.0 sys=3D4= .0 "cygiconv-2.dll" v0.0 ts=3D2004/7/6 14:10 22k 2001/12/13 C:\cygwin\bin\cygintl-1.dll - os=3D4.0 img=3D1.0 sys=3D4.0 "cygintl-1.dll" v0.0 ts=3D2001/12/13 4:28 37k 2003/08/10 C:\cygwin\bin\cygintl-2.dll - os=3D4.0 img=3D1.0 sys=3D4.0 "cygintl-2.dll" v0.0 ts=3D2003/8/10 17:50 54k 2004/07/06 C:\cygwin\bin\cygintl-3.dll - os=3D4.0 img=3D1.0 sys=3D4.0 "cygintl-3.dll" v0.0 ts=3D2004/7/6 13:51 26k 2001/04/25 C:\cygwin\bin\cygmenu5.dll - os=3D4.0 img=3D1.0 sys=3D4.0 "cygmenu5.dll" v0.0 ts=3D2001/4/25 1:27 20k 2002/01/09 C:\cygwin\bin\cygmenu6.dll - os=3D4.0 img=3D1.0 sys=3D4.0 "cygmenu6.dll" v0.0 ts=3D2002/1/9 1:03 29k 2003/08/09 C:\cygwin\bin\cygmenu7.dll - os=3D4.0 img=3D1.0 sys=3D4.0 "cygmenu7.dll" v0.0 ts=3D2003/8/9 5:25 156k 2001/04/25 C:\cygwin\bin\cygncurses++5.dll - os=3D4.0 img=3D1.0 sys= =3D4.0 "cygncurses++5.dll" v0.0 ts=3D2001/4/25 1:29 175k 2002/01/09 C:\cygwin\bin\cygncurses++6.dll - os=3D4.0 img=3D1.0 sys= =3D4.0 "cygncurses++6.dll" v0.0 ts=3D2002/1/9 1:03 226k 2001/04/25 C:\cygwin\bin\cygncurses5.dll - os=3D4.0 img=3D1.0 sys=3D= 4.0 "cygncurses5.dll" v0.0 ts=3D2001/4/25 1:17 202k 2002/01/09 C:\cygwin\bin\cygncurses6.dll - os=3D4.0 img=3D1.0 sys=3D= 4.0 "cygncurses6.dll" v0.0 ts=3D2002/1/9 1:03 224k 2003/08/09 C:\cygwin\bin\cygncurses7.dll - os=3D4.0 img=3D1.0 sys=3D= 4.0 "cygncurses7.dll" v0.0 ts=3D2003/8/9 5:24 15k 2001/04/25 C:\cygwin\bin\cygpanel5.dll - os=3D4.0 img=3D1.0 sys=3D4.0 "cygpanel5.dll" v0.0 ts=3D2001/4/25 1:27 12k 2002/01/09 C:\cygwin\bin\cygpanel6.dll - os=3D4.0 img=3D1.0 sys=3D4.0 "cygpanel6.dll" v0.0 ts=3D2002/1/9 1:03 19k 2003/08/09 C:\cygwin\bin\cygpanel7.dll - os=3D4.0 img=3D1.0 sys=3D4.0 "cygpanel7.dll" v0.0 ts=3D2003/8/9 5:24 62k 2003/12/11 C:\cygwin\bin\cygpcre-0.dll - os=3D4.0 img=3D1.0 sys=3D4.0 "cygpcre-0.dll" v0.0 ts=3D2003/12/11 12:01 63k 2003/04/11 C:\cygwin\bin\cygpcre.dll - os=3D4.0 img=3D1.0 sys=3D4.0 "cygpcre.dll" v0.0 ts=3D2003/4/11 4:31 9k 2003/12/11 C:\cygwin\bin\cygpcreposix-0.dll - os=3D4.0 img=3D1.0 sys= =3D4.0 "cygpcreposix-0.dll" v0.0 ts=3D2003/12/11 12:01 61k 2003/04/11 C:\cygwin\bin\cygpcreposix.dll - os=3D4.0 img=3D1.0 sys= =3D4.0 "cygpcreposix.dll" v0.0 ts=3D2003/4/11 4:31 108k 2001/06/28 C:\cygwin\bin\cygreadline4.dll - os=3D4.0 img=3D1.0 sys= =3D4.0 "cygreadline4.dll" v0.0 ts=3D2001/1/6 23:34 148k 2003/08/10 C:\cygwin\bin\cygreadline5.dll - os=3D4.0 img=3D1.0 sys= =3D4.0 "cygreadline5.dll" v0.0 ts=3D2003/8/10 19:16 61k 2003/12/04 C:\cygwin\bin\cygz.dll - os=3D4.0 img=3D1.0 sys=3D4.0 "cygz.dll" v0.0 ts=3D2003/12/3 22:03 1111k 2004/09/05 C:\cygwin\bin\cygwin1.dll - os=3D4.0 img=3D1.0 sys=3D4.0 "cygwin1.dll" v0.0 ts=3D2004/9/4 23:17 Cygwin DLL version info: DLL version: 1.5.11 DLL epoch: 19 DLL bad signal mask: 19005 DLL old termios: 5 DLL malloc env: 28 API major: 0 API minor: 116 Shared data: 4 DLL identifier: cygwin1 Mount registry: 2 Cygnus registry name: Cygnus Solutions Cygwin registry name: Cygwin Program options name: Program Options Cygwin mount registry name: mounts v2 Cygdrive flags: cygdrive flags Cygdrive prefix: cygdrive prefix Cygdrive default prefix:=20 Build date: Sat Sep 4 23:17:09 EDT 2004 Shared id: cygwin1S4 Cygwin Package Information Last downloaded files to: \\Dws1257-3gg7r21\Cygwin\packages Last downloaded files from: \\Dws1257-3gg7r21\Cygwin\packages Package Version=20=20=20=20=20=20=20=20=20=20=20=20 _update-info-dir 00227-1=20=20=20=20=20=20=20=20=20=20=20=20 ash 20040127-1=20=20=20=20=20=20=20=20=20 base-files 3.0-3=20=20=20=20=20=20=20=20=20=20=20=20=20=20 base-passwd 2.0-1=20=20=20=20=20=20=20=20=20=20=20=20=20=20 bash 2.05b-16=20=20=20=20=20=20=20=20=20=20=20 bzip2 1.0.2-5=20=20=20=20=20=20=20=20=20=20=20=20 cygwin 1.5.11-1=20=20=20=20=20=20=20=20=20=20=20 diffutils 2.8.7-1=20=20=20=20=20=20=20=20=20=20=20=20 editrights 1.01-1=20=20=20=20=20=20=20=20=20=20=20=20=20 fileutils 4.1-2=20=20=20=20=20=20=20=20=20=20=20=20=20=20 findutils 4.1.7-4=20=20=20=20=20=20=20=20=20=20=20=20 gawk 3.1.4-3=20=20=20=20=20=20=20=20=20=20=20=20 gdbm 1.8.3-7=20=20=20=20=20=20=20=20=20=20=20=20 grep 2.5-1=20=20=20=20=20=20=20=20=20=20=20=20=20=20 groff 1.18.1-2=20=20=20=20=20=20=20=20=20=20=20 gzip 1.3.5-1=20=20=20=20=20=20=20=20=20=20=20=20 less 381-1=20=20=20=20=20=20=20=20=20=20=20=20=20=20 libbz2_1 1.0.2-5=20=20=20=20=20=20=20=20=20=20=20=20 libgdbm 1.8.0-5=20=20=20=20=20=20=20=20=20=20=20=20 libgdbm-devel 1.8.3-7=20=20=20=20=20=20=20=20=20=20=20=20 libgdbm3 1.8.3-3=20=20=20=20=20=20=20=20=20=20=20=20 libgdbm4 1.8.3-7=20=20=20=20=20=20=20=20=20=20=20=20 libgettextpo0 0.14.1-1=20=20=20=20=20=20=20=20=20=20=20 libiconv2 1.9.2-1=20=20=20=20=20=20=20=20=20=20=20=20 libintl1 0.10.40-1=20=20=20=20=20=20=20=20=20=20 libintl2 0.12.1-3=20=20=20=20=20=20=20=20=20=20=20 libintl3 0.14.1-1=20=20=20=20=20=20=20=20=20=20=20 libncurses5 5.2-1=20=20=20=20=20=20=20=20=20=20=20=20=20=20 libncurses6 5.2-8=20=20=20=20=20=20=20=20=20=20=20=20=20=20 libncurses7 5.3-4=20=20=20=20=20=20=20=20=20=20=20=20=20=20 libpcre 4.1-1=20=20=20=20=20=20=20=20=20=20=20=20=20=20 libpcre0 4.5-1=20=20=20=20=20=20=20=20=20=20=20=20=20=20 libreadline4 4.1-2=20=20=20=20=20=20=20=20=20=20=20=20=20=20 libreadline5 4.3-5=20=20=20=20=20=20=20=20=20=20=20=20=20=20 login 1.9-7=20=20=20=20=20=20=20=20=20=20=20=20=20=20 man 1.5k-3=20=20=20=20=20=20=20=20=20=20=20=20=20 mktemp 1.5-3=20=20=20=20=20=20=20=20=20=20=20=20=20=20 ncurses 5.3-4=20=20=20=20=20=20=20=20=20=20=20=20=20=20 readline 4.3-5=20=20=20=20=20=20=20=20=20=20=20=20=20=20 sed 4.1.2-1=20=20=20=20=20=20=20=20=20=20=20=20 sh-utils 2.0.15-4=20=20=20=20=20=20=20=20=20=20=20 tar 1.13.25-5=20=20=20=20=20=20=20=20=20=20 termcap 20021106-2=20=20=20=20=20=20=20=20=20 terminfo 5.3_20030726-1=20=20=20=20=20 texinfo 4.2-4=20=20=20=20=20=20=20=20=20=20=20=20=20=20 textutils 2.0.21-1=20=20=20=20=20=20=20=20=20=20=20 which 1.5-2=20=20=20=20=20=20=20=20=20=20=20=20=20=20 zlib 1.2.1-1=20=20=20=20=20=20=20=20=20=20=20=20 Use -h to see help about each section ------_=_NextPart_000_01C49A9F.338AD2B0 Content-Type: text/plain; charset=us-ascii -- Unsubscribe info: http://cygwin.com/ml/#unsubscribe-simple Problem reports: http://cygwin.com/problems.html Documentation: http://cygwin.com/docs.html FAQ: http://cygwin.com/faq/ ------_=_NextPart_000_01C49A9F.338AD2B0--