-1

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?

sifferman
  • 2,615
  • 1
  • 21
  • 33
Xerxes8
  • 11
  • 1
  • 2
  • You looked at the questions but you didn't look at this question specifically? [How can I change my Cygwin home folder after installation?](https://stackoverflow.com/questions/1494658/how-can-i-change-my-cygwin-home-folder-after-installation) – direprobs Sep 01 '17 at 16:54
  • I did, but I don't know enough about Cygwin or Linux to use the information in a way that solves my problem. – Xerxes8 Sep 01 '17 at 17:03
  • I'm doing tutorials and everything, but most everything I looked at says the default home directory is cygdrive/c/Cygwin64/home, so I don't know how mine ended up different. – Xerxes8 Sep 01 '17 at 17:05
  • I think the answer is clear, what do you find hard to understand there? – direprobs Sep 01 '17 at 17:07
  • putting db_home: windows to /etc/nsswitch.conf doesn't do anything when I open Cygwin. Is there a certain way to edit the file? Right now I'm just using notepad. – Xerxes8 Sep 01 '17 at 18:08
  • I also tried making a symbolic link to desktop, and it shows up with ls, but when I try to cd into it, I get an error saying there is no such file or directory – Xerxes8 Sep 01 '17 at 18:14

2 Answers2

1

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.

matzeri
  • 6,546
  • 2
  • 10
  • 12
1

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.

Theta
  • 11
  • 1