View Issue Details
ID | Project | Category | View Status | Date Submitted | Last Update |
---|---|---|---|---|---|
0004037 | OpenFOAM | Bug | public | 2023-11-22 12:06 | 2023-11-28 17:00 |
Reporter | Lourencosm | Assigned To | henry | ||
Priority | low | Severity | minor | Reproducibility | always |
Status | closed | Resolution | suspended | ||
Platform | Ubuntu in WSL | OS | Ubuntu | OS Version | Ubuntu 22.04 |
Product Version | 11 | ||||
Summary | 0004037: foamCleanPath replaces the space characters in the PATH system variable with ':' | ||||
Description | Using OF11 in WSL, the PATH system variable contains Ms Windows paths with spaces. When sourcing OF11, with 'source /opt/openfoam11/etc/bashrc', the 'foamCleanPath' in '/opt/openfoam11/bin/' replaces the space characters in the PATH system variable with ':'. Thus, breaking the existing paths. | ||||
Tags | No tags attached. | ||||
|
Paths with spaces are not supported in OpenFOAM. |
|
I know that. I'll try to explain again. The problem is that OF11 is breaking the paths that exist in the Linux PATH system variable. With the growth of OF users using the Windows Subsystem for Linux (WSL), this issue could be addressed, as it was done in other OF distributions. |
|
Which path in particular has spaces in it? Despite the growth of OF users using the Windows Subsystem for Linux (WSL) none provide any OpenFOAM maintenance funding. |
|
Dear Henry, I've much respect for you and I also understand the funding issue. I just wanted to report a bug that affects WSL users, and contribute to a better OF.org. WSL installation is also proposed in OF.org. Feel free to close this report if it's not for the best interest of OF.org. Best regards In my case, the PATH variable, before sourcing the OF11, has the following paths with spaces, automatically created by the the WSL: /mnt/c/Program Files/Microsoft MPI/Bin/ /mnt/c/Program Files/ImageMagick-7.1.1-Q16-HDRI /mnt/c/Program Files/Microsoft VS Code/bin /mnt/c/Program Files/WinGet/Links /mnt/c/Program Files/PuTTY/ /mnt/c/Program Files/Meld/ /mnt/c/Program Files/MiKTeX/miktex/bin/x64/ /mnt/c/Program Files/dotnet/ /mnt/c/Program Files/MATLAB/R2013b/bin |
|
Something along the lines of the following information, can be added to the documentation page that instructs how to install OpenFOAM on WSL: Within the Ubuntu WSL terminal/console, edit the file `/etc/wsl.conf` and change/add the following entry, to disable the Windows PATH variable being merged into the Ubuntu environment: [interop] appendWindowsPath=False For more details, see https://learn.microsoft.com/en-us/windows/wsl/wsl-config#example-wslconf-file Sources: - https://askubuntu.com/a/1265320 - https://learn.microsoft.com/en-us/windows/wsl/wsl-config#example-wslconf-file |
|
I believe OpenFOAM is not the only source of problems when having pure spaces in your PATH variable. Try to avoid them on linux side or come up with a workaround. I'd recommend you to escape the whitespace by "\" which may already mitigate the problem. If not, then you could try to create a well behaving symlink into those directories. |
|
Wouldn't be simpler to modify 'foamCleanPath' to cope with spaces as it is done in OFv2306? Can anyone explain to me why this is not an option? Or the best solution? WSL is here to stay and will help a lot to spread OF. |
|
I think this is not really WSL related issue as such but more on the fact that if you use spaces in your PATH, they are changed, despite the platform. Having non-escaped characters can create anyway problems, that is the reason why typically you try to avoid them. If you could point out the issue and provide a new logic with some testing, I believe the maintainers and rest of the community can indeed tackle the issue. Even if it is the "best" solution, somebody needs to do it and test it. If you can provide a solution, I'm happy to test it. |
|
Pending funding from WSL users. |
Date Modified | Username | Field | Change |
---|---|---|---|
2023-11-22 12:06 | Lourencosm | New Issue | |
2023-11-22 12:20 | henry | Note Added: 0013158 | |
2023-11-22 13:21 | Lourencosm | Note Added: 0013159 | |
2023-11-22 13:48 | henry | Note Added: 0013160 | |
2023-11-22 15:43 | Lourencosm | Note Added: 0013161 | |
2023-11-22 16:53 | wyldckat | Note Added: 0013162 | |
2023-11-22 23:47 | peksa | Note Added: 0013163 | |
2023-11-23 09:11 | Lourencosm | Note Added: 0013164 | |
2023-11-23 09:57 | peksa | Note Added: 0013165 | |
2023-11-28 17:00 | henry | Assigned To | => henry |
2023-11-28 17:00 | henry | Status | new => closed |
2023-11-28 17:00 | henry | Resolution | open => suspended |
2023-11-28 17:00 | henry | Note Added: 0013167 |