From: Andrew DeFaria <Andrew@DeFaria.com>
To: cygwin@cygwin.com
Subject: Re: How do I change the default home directory after I fire up cygwin?
Date: Tue, 22 Jan 2013 17:58:00 -0000 [thread overview]
Message-ID: <kdmjvk$tj9$1@ger.gmane.org> (raw)
In-Reply-To: <738549989.20130122203154@mtu-net.ru>
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/<my name> 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/<my name>?
>> 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/<userid>, 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:
//<server>/<share> /home/<userid> ntfs
binary,posix=0,user 0 0
and make sure your line in /etc/passwd sets your home directory to
/home/<userid>. In this manner everybody's happy and no matter which
architecture you're on (Windows/Linux/Solaris/etc) home is always
/home/<userid>...
There's no place like $HOME... :-)
--
Andrew DeFaria <http://defaria.com>
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
prev parent reply other threads:[~2013-01-22 17:58 UTC|newest]
Thread overview: 13+ messages / expand[flat|nested] mbox.gz Atom feed top
2013-01-22 15:52 Yves
2013-01-22 16:03 ` marco atzeri
2013-01-22 16:35 ` Yves
2013-01-22 16:35 ` Andrey Repin
2013-01-22 16:37 ` Yves
2013-01-22 16:43 ` Yves
2013-01-22 17:13 ` David T-G
2013-01-22 17:50 ` Yves
2013-01-22 17:56 ` Yves
2013-01-22 18:05 ` Adam Dinwoodie
2013-01-22 18:31 ` Yves
2013-01-22 18:05 ` Andrew DeFaria
2013-01-22 17:58 ` Andrew DeFaria [this message]
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to='kdmjvk$tj9$1@ger.gmane.org' \
--to=andrew@defaria.com \
--cc=cygwin@cygwin.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).