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 Delivered-To: mailing list cygwin AT cygwin DOT com Message-ID: From: =?iso-8859-1?Q?=22Schaible=2C_J=F6rg=22?= To: "Cygwin AT Cygwin. Com" Subject: RE: $HOME Directory Relocation Date: Wed, 6 Feb 2002 11:08:28 +0100 MIME-Version: 1.0 X-Mailer: Internet Mail Service (5.5.2653.19) Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: 8bit X-MIME-Autoconverted: from quoted-printable to 8bit by delorie.com id g16AAnP23209 Hi Laurence, I tried to correlate Window's home and Cygwin's home by the following lines in /etc/profile. I end up mounting /home to the "Profile" directory of Windows (wherever it may be in the different versions) and set home according to $USERPROFILE that is set by the system. This gives a quite natural Unix feeling for "ls /home", although "ls ~" just works for my own account. ====== snip = snap ========= COMMON_DESKTOP=`regtool get '\HKLM\Software\Microsoft\Windows\CurrentVersion\Explorer\Shell Folders\Common Desktop'` ALLHOME=`cygpath -u "$COMMON_DESKTOP/../.."` ALLHOME=`cygpath -wsa "$ALLHOME" | tr [a-z] [A-Z]` if [ ! -d /home ]; then mkdir /home fi if [ "$ALLHOME" != "`cygpath -wsa /home`" ]; then echo Mounting `cygpath -wsa $ALLHOME` to /home mount -s -b -f "`cygpath -wsa $ALLHOME`" /home > /dev/null 2>&1 fi unset ALLHOME COMMON_DESKTOP USER="`id -un`" # Set up USER's home directory if [ -z "$HOME" ]; then HOME=`cygpath -ua "$USERPROFILE"` fi HOME=`cygpath -wsa "$USERPROFILE"` HOME=`cygpath -ua "$HOME"` export HOME USER ====== snip = snap ========= Another benefit: Your settings are part of the Window's profile, i.e. can be shared for your account automatically in a server environment for different machines. Regards, Jörg -- 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/