7
3
I use mintty as my console emulator for MinGW/MSYS. Recently (I'm not certain exactly when), the home directory used by this combination changed from my Windows user folder (/c/Users/<me>/
) to /home/<me>/
, which is causing minor havoc for me.
How can I change my home directory back? I've done some searching online, but all of the information I've been able to find so far is Cygwin-specific and hasn't translated well to MinGW/MSYS.
The most likely-looking avenues I've pursued so far are /etc/passwd
and /etc/nsswitch.conf
, both of which are entirely absent from MSYS' root. I've tried creating an /etc/nsswitch.conf
containing a db_home: windows
line, but this seemed to have no effect. I've not yet tried creating an /etc/passwd
file as mkpasswd
isn't present in MinGW/MSYS and I don't know what its contents should be.
I'm running:
- Windows 10 (w/ Anniversary Update)
- the latest version of all my installed MinGW and MSYS packages
- …including msys-mintty 1.0.3-1-msys-1.0.17
I had tried just exporting the envvar in an existing terminal (it had a value that it pulled from who knows where), but MINGW still wouldn't use the new value it for some reason. Setting it through this method worked wonders though! – agweber – 2018-11-30T14:19:47.600
In MSYS2, this worked for shell, but did not work for ssh for some reason. nsswitch.conf way worked for me. – Konstantin Pelepelin – 2019-11-04T17:33:05.433