Can't change Cygwin Home Directory from /SPB_Data

4.4k views Asked by At

I recently installed Cygwin. Its default home directory is

/cygdrive/c/Users/<username>/AppData/Roaming/SPB_Data

[Editor's note: this also applies when the directory is /cygdrive/c/SPB_Data.]

I have tried changing the db_home setting in /etc/nsswitch.conf according to this post, but that doesn't make any difference.

How do I change the home directory to /cygdrive/c/Cygwin64/home?

2

There are 2 answers

0
matzeri On

see https://cygwin.com/cygwin-ug-net/ntsec.html#ntsec-mapping-nsswitch
and set on /etc/nsswitch.conf

db_home:  /home/%U 

Don't use notepad as it will set the line end to windows default CRLF

After changing the file, close all cygwin processes, as its value is read at cygwin start.

3
Theta On

With high likelyhood you have installed some software from Allegro (now owned by cadence) after installing cygwin. Allegro overwrites the windows system variable 'HOME' and sets it to 'C:\SPB_Data' To fix this delete the enviroment variable, then the home folder can be set according to the linked stackoverflow question. Alternatively you could set the correct home folder path in the enviroment variable, but this is not reccomnended according to cygwin documentation.

cygwin documentation: https://cygwin.com/cygwin-ug-net/setup-env.html

Also see this old forum post https://community.cadence.com/general_topics/f/feedback-suggestions-and-questions/17969/orcad-install-killed-oracle-virtualbox

I registered to reply to this old question since it is the top result on google (for me at least) when searching for 'cygwin SPB_data'. And this question sendt me in the right direction, but did not contain the correct answer.