View Issue Details
ID | Project | Category | View Status | Date Submitted | Last Update |
---|---|---|---|---|---|
0003614 | OpenFOAM | Patch | public | 2021-01-14 16:01 | 2021-01-14 17:47 |
Reporter | alma | Assigned To | henry | ||
Priority | normal | Severity | minor | Reproducibility | always |
Status | closed | Resolution | no change required | ||
Platform | Windows subsystem Linux | OS | Ubuntu | OS Version | 20.04 |
Summary | 0003614: Spaces are replaced with colons when transporting the environment variables into WSL because of using OpenFoam | ||||
Description | I am using windows-subsystem-for-Linux, and I choose Ubuntu. But I can't call the program installed on the Windows OS, so I check the environment variable list in WSL, it seems that the spaces are replaced with colons when transporting the environment variables into WSL. Considering that in WSL, the environment variables list is a colon-delimited list. In Win32, it is a semicolon-delimited list. I found that this is because I am using OpenFoam, and when the PATH env of OpenFoam takes effect, it rebuilds the PATH environment variable, the corresponding setting in ~/.bashrc file is: source /opt/openfoam8/etc/bashrc As shown in the following screenshot, OpenFoam would rebuild the $PATH environment variable, with colon and space as the delimiter. | ||||
Additional Information | As more users are using WSL to learn and run OpenFoam, I suggest that we could use some other delimiters when rebuilding the environment variable($PATH) . | ||||
Tags | No tags attached. | ||||
|
|
|
Why do you have spaces in your environment variables? |
|
Because in Windows, the default installation directory is "C:\Program Files\" and "C:\Program Files (x86)\", e.g, when I install Visual Studio Code, it is installed in "C:\Program Files\". |
|
Spaces in file name or environment variable are not supported in OpenFOAM. |
|
WSL supports spaces in the environment variables, so I could use the VS code installed on Windows Host OS. But OpenFoam would rebuild the environment variable(PATH), and cause damage to the corresponding PATH of VS code. |
|
Spaces in file name or environment variable are not supported in OpenFOAM, I don't know what more I can say. If you want to change the OpenFOAM scripts to suit your purpose feel free to do so. |
Date Modified | Username | Field | Change |
---|---|---|---|
2021-01-14 16:01 | alma | New Issue | |
2021-01-14 16:01 | alma | File Added: source code screenshot.jpg | |
2021-01-14 16:01 | alma | File Added: wrong format of Environment Variables in WSL.jpg | |
2021-01-14 16:08 | henry | Note Added: 0011815 | |
2021-01-14 16:13 | alma | Note Added: 0011816 | |
2021-01-14 16:22 | henry | Note Added: 0011817 | |
2021-01-14 16:30 | alma | Note Added: 0011818 | |
2021-01-14 16:46 | henry | Note Added: 0011819 | |
2021-01-14 16:46 | henry | Assigned To | => henry |
2021-01-14 16:46 | henry | Status | new => closed |
2021-01-14 16:46 | henry | Resolution | open => no change required |