View Issue Details

IDProjectCategoryView StatusLast Update
0003810OpenFOAMPatchpublic2022-03-01 22:57
Reporterwyldckat Assigned Tochris  
PrioritynormalSeveritytextReproducibilitysometimes
Status resolvedResolutionfixed 
Summary0003810: WSL v2 can change its host IP address once in a while, so we need 'DISPLAY' to be set accordingly each time
DescriptionIn page https://openfoam.org/download/windows/ - we currently have this command for WSL v2:

    echo "export DISPLAY=$(awk '/nameserver / {print $2; exit}' /etc/resolv.conf 2>/dev/null):0" >> ${HOME}/.bashrc

However, this hard-codes the IP address to the current one. Therefore, we need this to always be set directly from the origin file, each time a new command line is started.
The fix is simple, namely we have to escape the 2 dollar signs:

    echo "export DISPLAY=\$(awk '/nameserver / {print \$2; exit}' /etc/resolv.conf 2>/dev/null):0" >> ${HOME}/.bashrc

TagsNo tags attached.

Activities

chris

2022-03-01 22:57

manager   ~0012507

Thanks Bruno, change applied.

Issue History

Date Modified Username Field Change
2022-02-28 12:41 wyldckat New Issue
2022-02-28 12:41 wyldckat Status new => assigned
2022-02-28 12:41 wyldckat Assigned To => chris
2022-03-01 22:57 chris Status assigned => resolved
2022-03-01 22:57 chris Resolution open => fixed
2022-03-01 22:57 chris Note Added: 0012507