Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Simplify WSL docs #1343

Merged
merged 1 commit into from
Feb 14, 2023
Merged

Simplify WSL docs #1343

merged 1 commit into from
Feb 14, 2023

Conversation

traversaro
Copy link
Member

@traversaro traversaro commented Feb 14, 2023

In particular:

  • Just document WSLg to run graphical applications as not it is available also on Windows 10
  • Do not document anymore WSL1 as it is not really widely used, and it is not worth to document it (any user expert enough to run WSL1 will be able to configure its system appropriately)

Fix #1190 .

@traversaro
Copy link
Member Author

traversaro commented Feb 14, 2023

For the sake of googlability, I will include here the information on how to use the robotology-superbuild with WSL1, that are removed by this PR.

WSL1

With respect to WSL2, WSL1 uses the same IP address used by the Windows machine, so the amount of configuration and tweaks required are less.

Run graphical applications on WSL1

To run graphical applications on WSL, you need to install a X Server for Windows, that will be able to visualize the windows WSL-based applications, see https://www.howtogeek.com/261575/how-to-run-graphical-linux-desktop-applications-from-windows-10s-bash-shell/ for more info. For information of X Servers that can be installed on Windows, follow the docs in https://github.com/sirredbeard/Awesome-WSL#10-gui-apps .

Sanitize enviroment variables for WSL1

By default, the PATH enviroment variable in WSL will contain the path of the host Windows system, see microsoft/WSL#1640 and microsoft/WSL#1493. This can create problems,
as the CMake in WSL may find (incompatible) Windows CMake packages and try to use them, creating errors due to the compilation.
To avoid that, you can add the following line in the WSL .bashrc that filters all the Windows paths from the WSL's enviromental variables:

for var in $(env | awk {'FS="="} /\/mnt\//{print $1}'); do export ${var}=\"$(echo ${!var} | awk -v RS=: -v ORS=: '/\/mnt\// {next} {print $1}')\" ; done

@traversaro
Copy link
Member Author

Please ignore the CI failure as it is related to #1344 .

@traversaro traversaro merged commit c67b5f2 into master Feb 14, 2023
@traversaro traversaro deleted the simplify branch February 14, 2023 16:09
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Update WSL2 documentation to cover WSLg
2 participants