This is the mail archive of the
cygwin
mailing list for the Cygwin project.
RE: I need to change my home directory
- From: "Buchbinder, Barry (NIH/NIAID)" <BBuchbinder at niaid dot nih dot gov>
- To: cygwin at cygwin dot com
- Date: Fri, 22 Apr 2005 12:56:04 -0400
- Subject: RE: I need to change my home directory
At Friday, April 22, 2005 11:46 AM, marcos rebelo wrote:
> Hy all
>
> My home directory is something like:
>
> /cygdrive/c/Documents and Settings/xpto
>
> I would like to have it in:
>
> /home/xpto
>
> I have this in one computer but not in the other. But I didn't do
> nothing for that.
>
> What am I doing wrong?
>
> Thanks
> Marcos
Windows, not Cygwin, is setting HOME to "C:\Documents and Settings\xpto".
You need to set it to what you want on your machine.
You can either set it in the batch file that starts your shell or globally
in Windows. (Setting it globally: in Win9x: autoexec.bat (or config.sys if
your version supports setting the environment there); in XP (and presumably
other members of the NT family): Control Panel | System | Advanced |
Environment Variables.)
The above (XP/Control Panel) is what I actually do. It is also possible
that the below might work, but I haven't tried it.
man bash / INVOCATION says that when bash is started as a login shell,
/etc/profile is always read; you could set it there. You could also put a
.bashrc in "C:\Documents and Settings\xpto", have it export HOME=/home/xpto,
and then source ~/.bashrc or whatever you want to happen next.
Or see
http://sources.redhat.com/cygwin/cygwin-ug-net/using-utils.html#mkpasswd for
hints on setting it in /etc/passwd. (But I really don't know if bash or the
cygwin dll actually check /etc/passwd.)
--
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/