delorie.com/archives/browse.cgi   search  
Mail Archives: cygwin/2007/09/17/20:51:55

X-Recipient: archive-cygwin AT delorie DOT com
X-Spam-Check-By: sourceware.org
Subject: Re: Space in Home Directory Path
In-Reply-To: <46EF0932.8090902@schoenhaber>
To: cygwin AT cygwin DOT com
Date: Mon, 17 Sep 2007 19:46:08 -0400 (EDT)
X-Mailer: ELM [version 2.4ME+ PL124 (25)]
MIME-Version: 1.0
Message-Id: <E1IXQI4-0007Hc-Cr@owl.gateway.2wire.net>
From: Robert Kiesling <kiesling AT earthlink DOT net>
X-ELNK-Trace: 0b901cbc512a9d8594f5150ab1c16ac01a238acc8405a5b000c4ebf119b81d612cf17993e6865e6d350badd9bab72f9c350badd9bab72f9c350badd9bab72f9c
Mailing-List: contact cygwin-help AT cygwin DOT com; run by ezmlm
List-Id: <cygwin.cygwin.com>
List-Unsubscribe: <mailto:cygwin-unsubscribe-archive-cygwin=delorie DOT com AT cygwin DOT com>
List-Subscribe: <mailto:cygwin-subscribe AT cygwin DOT com>
List-Archive: <http://sourceware.org/ml/cygwin/>
List-Post: <mailto:cygwin AT cygwin DOT com>
List-Help: <mailto:cygwin-help AT cygwin DOT com>, <http://sourceware.org/ml/#faqs>
Sender: cygwin-owner AT cygwin DOT com
Mail-Followup-To: cygwin AT cygwin DOT com
Delivered-To: mailing list cygwin AT cygwin DOT com

[ Charset UTF-8 unsupported, converting... ]
> G. Huang wrote:
> 
> > So my question is: Is there a way to change the home directory on the XP
> > machine to c:\cygwin\home\gang? Or alternatively, get around the space
> > problem?
> 
> http://cygwin.com/faq/faq.setup.html#faq.setup.home
> 
> In /etc/passwd, set the the user home directory field to the desired
> value, ex.
> /cygdrive/c/home/gang.
> 
> The workaround for the problem with spaces in paths is to not have
> spaces in paths - as the FAQ has already told you. One possible way to
> achieve this is to use the 8.3-style-version of the path. For example,
> the user home directory field in /etc/passwd for my main account is set to
> /cygdrive/c/DOKUME~1/mks/Home
> (i. e. pointing to C:\Dokumente und Einstellungen\mks\Home) and I have
> never had any problems with this setting.

With bash, it's also possible to quote a file or directory name:

 PATH="$PATH:/Documents and Settings"

but it isn't portable in all shells.

Another solution would be to symlink the Windows directory into the home
directory.

  ln -s /cygdrive/c/Documents and Settings/gang .

and there should be no problem adding the symlinked directory to the path.

-- 
Ctalk Home Page: http://ctalk-lang.sourceforge.net


--
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/

- Raw text -


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