X-Recipient: archive-cygwin AT delorie DOT com X-SWARE-Spam-Status: No, hits=-1.6 required=5.0 tests=AWL,BAYES_00,KHOP_THREADED,RCVD_IN_DNSWL_NONE,RP_MATCHES_RCVD,SPF_HELO_PASS,TBC,TW_MK X-Spam-Check-By: sourceware.org To: cygwin AT cygwin DOT com From: Andrew DeFaria Subject: Re: How do I change the default home directory after I fire up cygwin? Date: Tue, 22 Jan 2013 09:58:15 -0800 Lines: 40 Message-ID: References: <1358869942988-95558 DOT post AT n5 DOT nabble DOT com> <738549989 DOT 20130122203154 AT mtu-net DOT ru> Mime-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit User-Agent: Mozilla/5.0 (Windows NT 6.1; rv:17.0) Gecko/20130107 Thunderbird/17.0.2 In-Reply-To: <738549989.20130122203154@mtu-net.ru> X-IsSubscribed: yes Mailing-List: contact cygwin-help AT cygwin DOT com; run by ezmlm Precedence: bulk List-Id: List-Unsubscribe: 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 On 1/22/2013 8:31 AM, Andrey Repin wrote: > Greetings, Yves! > >> I start up cygwin and do pwd, and this is my home directory. >> $ pwd >> /cygdrive/h >> But, I don't want it to be in /cygdrive/h. So, what gives? I've run the >> mkpasswd command like so (while in my /home/ directory): >> mkpasswd -l -p "$(cygpath -H)" > /etc/passwd >> At that point, I close my cygwin window and open it again... and same thing >> when I run pwd. How do I make cygwin think and start in /home/? >> I've even mucked with the /etc/passwd for my user account and STILL no >> result. >> Very confused... > Check the contents of your $HOME variable. Yes, check the contents of your $HOME environment variable as set in Windows (not Cygwin) by looking at My Computer: Properties: Advanced: Environment Variables. Check both User and System Environment variables sections (user will override system). It is common in corporate environments to use the H drive to point to some remote file system that gets mounted at boot time. That's your real home directory and often the same home directory you'll use on Unix/Linux machines should your company have any of them. Sharing a home directory is a good thing. As for /etc/password and /home/, what I usually do is figure out what this H drive points to and then add something like the following to /etc/fstab and do a mount -a: /// /home/ ntfs binary,posix=0,user 0 0 and make sure your line in /etc/passwd sets your home directory to /home/. In this manner everybody's happy and no matter which architecture you're on (Windows/Linux/Solaris/etc) home is always /home/... There's no place like $HOME... :-) -- Andrew DeFaria This space for rent -- Problem reports: http://cygwin.com/problems.html FAQ: http://cygwin.com/faq/ Documentation: http://cygwin.com/docs.html Unsubscribe info: http://cygwin.com/ml/#unsubscribe-simple