* How do I change the default home directory after I fire up cygwin?
@ 2013-01-22 15:52 Yves
2013-01-22 16:03 ` marco atzeri
2013-01-22 16:35 ` Andrey Repin
0 siblings, 2 replies; 13+ messages in thread
From: Yves @ 2013-01-22 15:52 UTC (permalink / raw)
To: cygwin
Hi, this is my issue:
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...
P.S.: If this message shows up twice, I didn't mean to, was having a
difficult time trying to post to the mailing list.
--
View this message in context: http://cygwin.1069669.n5.nabble.com/How-do-I-change-the-default-home-directory-after-I-fire-up-cygwin-tp95558.html
Sent from the Cygwin list mailing list archive at Nabble.com.
--
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
^ permalink raw reply [flat|nested] 13+ messages in thread
* Re: How do I change the default home directory after I fire up cygwin?
2013-01-22 15:52 How do I change the default home directory after I fire up cygwin? Yves
@ 2013-01-22 16:03 ` marco atzeri
2013-01-22 16:35 ` Yves
2013-01-22 16:35 ` Andrey Repin
1 sibling, 1 reply; 13+ messages in thread
From: marco atzeri @ 2013-01-22 16:03 UTC (permalink / raw)
To: cygwin
On 1/22/2013 4:52 PM, Yves wrote:
> Hi, this is my issue:
>
> 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...
Dear Yves
what is the output of
$ grep <your name> /etc/passwd
on my case, as example:
$ grep marco /etc/passwd
marco:unused:1008:544:Marco Atzeri, [cut] :/home/marco:/bin/bash
so /home/marco is my home directory
please note that cygpath -H is not the same
$ cygpath -H
/cygdrive/c/Users
Regards
Marco
Regards
Marco
--
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
^ permalink raw reply [flat|nested] 13+ messages in thread
* Re: How do I change the default home directory after I fire up cygwin?
2013-01-22 16:03 ` marco atzeri
@ 2013-01-22 16:35 ` Yves
0 siblings, 0 replies; 13+ messages in thread
From: Yves @ 2013-01-22 16:35 UTC (permalink / raw)
To: cygwin
Hi, thanks for your reply.
I did cat /etc/passwd. I obfuscated certain portions of the output, all of
which are characters (no numbers, no spaces, no special characters, all
lower case):
<user name>@FOOBAR /home/<user name>/Downloads
$ cat /etc/passwd
SYSTEM:*:18:544:,S-1-5-18::
LocalService:*:19:544:U-NT AUTHORITY\LocalService,S-1-5-19::
NetworkService:*:20:544:U-NT AUTHORITY\NetworkService,S-1-5-20::
Administrators:*:544:544:,S-1-5-32-544::
TrustedInstaller:*:4294967294:4294967294:U-NT
SERVICE\TrustedInstaller,S-1-5-80-956008885-3418522649-1831038044-1853292631-2271478464::
ashvets:unused:1003:513:<user name>,U-FOOBAR\<user
name>,S-1-5-21-1225255616-1463261690-3474574673-1003:/cygdrive/c/cygwin/home/<user
name>:/bin/bash
I've set the home to /home/<user name> before, closed cygwin and opened it
again, no change.
I'd do pwd, see that I'm in /cygdrive/h, then I'd execute cd (no parameters,
just the command) and I'd be in /cygdrive/h again. No idea why....
--
View this message in context: http://cygwin.1069669.n5.nabble.com/How-do-I-change-the-default-home-directory-after-I-fire-up-cygwin-tp95558p95561.html
Sent from the Cygwin list mailing list archive at Nabble.com.
--
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
^ permalink raw reply [flat|nested] 13+ messages in thread
* Re: How do I change the default home directory after I fire up cygwin?
2013-01-22 15:52 How do I change the default home directory after I fire up cygwin? Yves
2013-01-22 16:03 ` marco atzeri
@ 2013-01-22 16:35 ` Andrey Repin
2013-01-22 16:37 ` Yves
` (2 more replies)
1 sibling, 3 replies; 13+ messages in thread
From: Andrey Repin @ 2013-01-22 16:35 UTC (permalink / raw)
To: Yves, cygwin
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.
--
WBR,
Andrey Repin (anrdaemon@freemail.ru) 22.01.2013, <20:31>
Sorry for my terrible english...
--
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
^ permalink raw reply [flat|nested] 13+ messages in thread
* Re: How do I change the default home directory after I fire up cygwin?
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:58 ` Andrew DeFaria
2 siblings, 1 reply; 13+ messages in thread
From: Yves @ 2013-01-22 16:37 UTC (permalink / raw)
To: cygwin
I did echo $HOME and this is the output that I got:
/cygdrive/h
--
View this message in context: http://cygwin.1069669.n5.nabble.com/How-do-I-change-the-default-home-directory-after-I-fire-up-cygwin-tp95558p95563.html
Sent from the Cygwin list mailing list archive at Nabble.com.
--
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
^ permalink raw reply [flat|nested] 13+ messages in thread
* Re: How do I change the default home directory after I fire up cygwin?
2013-01-22 16:37 ` Yves
@ 2013-01-22 16:43 ` Yves
0 siblings, 0 replies; 13+ messages in thread
From: Yves @ 2013-01-22 16:43 UTC (permalink / raw)
To: cygwin
Ok, so if I do HOME=/home/<user name> I go to the home directory that I want
to go to. Yes! But when I close my cygwin window and then re-open it, I'm
back in /cygdrive/h... hmm...
--
View this message in context: http://cygwin.1069669.n5.nabble.com/How-do-I-change-the-default-home-directory-after-I-fire-up-cygwin-tp95558p95564.html
Sent from the Cygwin list mailing list archive at Nabble.com.
--
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
^ permalink raw reply [flat|nested] 13+ messages in thread
* Re: How do I change the default home directory after I fire up cygwin?
2013-01-22 16:35 ` Andrey Repin
2013-01-22 16:37 ` Yves
@ 2013-01-22 17:13 ` David T-G
2013-01-22 17:50 ` Yves
2013-01-22 17:58 ` Andrew DeFaria
2 siblings, 1 reply; 13+ messages in thread
From: David T-G @ 2013-01-22 17:13 UTC (permalink / raw)
To: CygWin Users' List
[-- Attachment #1: Type: text/plain, Size: 1440 bytes --]
Andrey & Yves, et atl --
...and then Andrey Repin said...
%
% > I start up cygwin and do pwd, and this is my home directory.
% > $ pwd
% > /cygdrive/h
%
...
%
% Check the contents of your $HOME variable.
But isn't $HOME set based on what the shell gets? So whatever is setting
it wrong is going to continue to do so as long as it gets garbage.
Yves, is this in an NT domain environment or standalone? You might go to
Control Panel -> System -> Advanced -> Environment Variables and check
for something like "profile directory" there; it's been a long time, but
I vaguely recall having a similar problem (before I for other reasons
just told them to get rid of my stupid H: drive that always got in the
way :-)
Here's how my system, under an NT domain, looks:
dt6667@gacdtl03dt6667 ~
$ egrep dt6667 /etc/passwd
dt6667:unused:1694918:544:U-ITSERVICES\DT6667,S-1-5-21-2057499049-1289676208-1959431660-1684918:/home/dt6667:/bin/bash
dt6667@gacdtl03dt6667 ~
$ df -kh /home
Filesystem Size Used Avail Use% Mounted on
C:/documents and settings 233G 226G 7.6G 97% /home
HTH & HAND
:-D
--
David T-G
See http://justpickone.org/davidtg/email/
See http://justpickone.org/davidtg/tofu.txt
I appreciate everyone's individual tactic in the Spam Wars, but I just
don't have the time or energy to captcha or register or whatever to be
able to send you email.
[-- Attachment #2: Type: application/pgp-signature, Size: 187 bytes --]
^ permalink raw reply [flat|nested] 13+ messages in thread
* Re: How do I change the default home directory after I fire up cygwin?
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 ` Andrew DeFaria
0 siblings, 2 replies; 13+ messages in thread
From: Yves @ 2013-01-22 17:50 UTC (permalink / raw)
To: cygwin
This machine is on a corporate network, I'm doing this setup at work :) .
And yes, there's a domain.
And, after looking at System variables, I found HOME which is pointed to
H:\. Would it make sense to just set that to C:\cygwin\home\<user name>?
--
View this message in context: http://cygwin.1069669.n5.nabble.com/How-do-I-change-the-default-home-directory-after-I-fire-up-cygwin-tp95558p95573.html
Sent from the Cygwin list mailing list archive at Nabble.com.
--
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
^ permalink raw reply [flat|nested] 13+ messages in thread
* Re: How do I change the default home directory after I fire up cygwin?
2013-01-22 17:50 ` Yves
@ 2013-01-22 17:56 ` Yves
2013-01-22 18:05 ` Adam Dinwoodie
2013-01-22 18:05 ` Andrew DeFaria
1 sibling, 1 reply; 13+ messages in thread
From: Yves @ 2013-01-22 17:56 UTC (permalink / raw)
To: cygwin
Ok, so I changed HOME in Environment variables to C:\cygwin\home\<user name>
and when I do pwd, this is what happens:
/cygdrive/c/cygwin/home/<user name>
Ok... it's not /home/<user name>, but it's progress :) .
--
View this message in context: http://cygwin.1069669.n5.nabble.com/How-do-I-change-the-default-home-directory-after-I-fire-up-cygwin-tp95558p95574.html
Sent from the Cygwin list mailing list archive at Nabble.com.
--
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
^ permalink raw reply [flat|nested] 13+ messages in thread
* Re: How do I change the default home directory after I fire up cygwin?
2013-01-22 16:35 ` Andrey Repin
2013-01-22 16:37 ` Yves
2013-01-22 17:13 ` David T-G
@ 2013-01-22 17:58 ` Andrew DeFaria
2 siblings, 0 replies; 13+ messages in thread
From: Andrew DeFaria @ 2013-01-22 17:58 UTC (permalink / raw)
To: cygwin
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
^ permalink raw reply [flat|nested] 13+ messages in thread
* RE: How do I change the default home directory after I fire up cygwin?
2013-01-22 17:56 ` Yves
@ 2013-01-22 18:05 ` Adam Dinwoodie
2013-01-22 18:31 ` Yves
0 siblings, 1 reply; 13+ messages in thread
From: Adam Dinwoodie @ 2013-01-22 18:05 UTC (permalink / raw)
To: cygwin
Yves wrote:
> Ok, so I changed HOME in Environment variables to C:\cygwin\home\<user name>
> and when I do pwd, this is what happens:
> /cygdrive/c/cygwin/home/<user name>
>
> Ok... it's not /home/<user name>, but it's progress :) .
Delete the HOME environment variable entirely. That way Cygwin will use what's
set in /etc/passwd, ie /home/user.
--
Adam Dinwoodie
Messages posted to this list are made in a personal capacity.
--
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
^ permalink raw reply [flat|nested] 13+ messages in thread
* Re: How do I change the default home directory after I fire up cygwin?
2013-01-22 17:50 ` Yves
2013-01-22 17:56 ` Yves
@ 2013-01-22 18:05 ` Andrew DeFaria
1 sibling, 0 replies; 13+ messages in thread
From: Andrew DeFaria @ 2013-01-22 18:05 UTC (permalink / raw)
To: cygwin
On 1/22/2013 9:50 AM, Yves wrote:
> This machine is on a corporate network, I'm doing this setup at work :) .
> And yes, there's a domain.
>
> And, after looking at System variables, I found HOME which is pointed to
> H:\. Would it make sense to just set that to C:\cygwin\home\<user name>?
Personally I'd delete the environment variable that sets HOME to a drive
letter. Drive letters are so 1990's! And largely unneeded anymore.
See also my other post about how to mount what was mounted at H to
/home/<userid>.
In general, IIRC Cygwin says that if HOME is already set in the Windows
environment then we'll use that - otherwise we'll use what's in
/etc/passwd (and I think last resort /home/<userid>).
--
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
^ permalink raw reply [flat|nested] 13+ messages in thread
* RE: How do I change the default home directory after I fire up cygwin?
2013-01-22 18:05 ` Adam Dinwoodie
@ 2013-01-22 18:31 ` Yves
0 siblings, 0 replies; 13+ messages in thread
From: Yves @ 2013-01-22 18:31 UTC (permalink / raw)
To: cygwin
Yes! It works just like I expect it to work! Thanks guys!
--
View this message in context: http://cygwin.1069669.n5.nabble.com/How-do-I-change-the-default-home-directory-after-I-fire-up-cygwin-tp95558p95579.html
Sent from the Cygwin list mailing list archive at Nabble.com.
--
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
^ permalink raw reply [flat|nested] 13+ messages in thread
end of thread, other threads:[~2013-01-22 18:31 UTC | newest]
Thread overview: 13+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2013-01-22 15:52 How do I change the default home directory after I fire up cygwin? 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 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).