I've got a working Xming / Cygwin installation set up on my Windows. Well, mostly...
I did set my home directory to /cygdrive/d in /etc/passwd. When I start the Cygwin Bash Shell (the pimped-up DOS window), this works - $HOME is set to /cygdrive/d, Cygwin finds my ~/.bash_profile, everything is fine.
However, when I start an xterm, it starts in /cygdrive/c/Documents and Settings/<Username>, and it does not source my .bash_profile, which is annoying as hell.
Sometime during this afternoon, it worked, and now it's broken, but for the life of me I cannot remember how I broke it.
Help?
Edit: Sorry, I should have been more precise. The xterm is started as xterm -ls, i.e. as login shell. It does find the global profile (because it runs a bash and sets $PS1 correctly), but it obviously gets confused about $HOME (and thus does not run ~/.bash_profile because it cannot find it).
I know a way or two to work around it, but I'd like to find the cause of this muckup, not fix the effects.
Edit2: Further testing showed that this - $HOME not being set according to /etc/passwd - happens only when the application is started from the Xming / Xmingrc taskbar menu. It's also contagious: Any sub-xterm started from a "broken" xterm opens in the wrong $HOME. Likewise the other way round: Any bash / xterm started outside the Xmingrc menu (that opens in the proper $HOME) can start sub-xterms that also are correct.
I'm a bit confused here.
C:\Documents and Settings\<user>when xterm is invoked? That would override the/etc/passwdsetting. – ak2 Aug 7 '10 at 22:21