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

Update WSL config docs #1176

Merged
merged 3 commits into from
Oct 31, 2017
Merged

Update WSL config docs #1176

merged 3 commits into from
Oct 31, 2017

Conversation

mezzode
Copy link
Contributor

@mezzode mezzode commented Oct 28, 2017

Docs needed an updated since the current version of WSL from the Fall Creators Update needs a different configuration to the beta version. See #1148.

It does feel kind of wrong having a path going inside a Windows App folder, but it works. I wonder whether WSL should add some environment variables for rootfs instead, though thats not really an issue for this repo.

@msftclas
Copy link

msftclas commented Oct 28, 2017

CLA assistant check
All CLA requirements met.

@mezzode
Copy link
Contributor Author

mezzode commented Oct 28, 2017

Related microsoft/WSL#2578

"intelliSenseMode": "clang-x64",
"includePath": [
"${workspaceRoot}",
"${localappdata}/lxss/rootfs/usr/lib/gcc/x86_64-linux-gnu/5/include",
Copy link
Member

@bobbrow bobbrow Oct 30, 2017

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

these look like the Beta paths.

"includePath": [
"${workspaceRoot}",
"${localappdata}/Packages/CanonicalGroupLimited.UbuntuonWindows_79rhkp1fndgsc/LocalState/rootfs/usr/include/c++/5",
"${localappdata}/Packages/CanonicalGroupLimited.UbuntuonWindows_79rhkp1fndgsc/LocalState/rootfs/usr/include/x86_64-linux-gnu/c++/5",
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

So this works for Ubuntu, but what about OpenSUSE and SLES which are also available in the Windows Store? Should we provide configs for each of them?

Copy link
Member

@bobbrow bobbrow left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I suspect that Ubuntu will be the most popular choice, but we should probably talk about the other distros as well. If you don't have time to test them out yourself, can you just add a note that the paths will be different for the other distros?

@mezzode
Copy link
Contributor Author

mezzode commented Oct 31, 2017

I already put a note about other distros on line 48.

Note that ${localappdata}/Packages/CanonicalGroupLimited.UbuntuonWindows_79rhkp1fndgsc/LocalState/rootfs/ is the path to the root of the Ubuntu filesystem. This will be different if you are using a different distro.

@icylogic
Copy link

icylogic commented Oct 31, 2017

We can generate paths for openSUSE, SUSE Linux Enterprise Server by

PS R:\> ($(get-appxpackage).PackageFamilyName | findstr /i 'SUSE Ubuntu') -replace '^', "$`{localappdata`}/Packages/"

${localappdata}/Packages/CanonicalGroupLimited.UbuntuonWindows_79rhkp1fndgsc
${localappdata}/Packages/46932SUSE.openSUSELeap42.2_022rs5jcyhyac
${localappdata}/Packages/46932SUSE.SUSELinuxEnterpriseServer12SP2_022rs5jcyhyac

Even for Fedora and any other subsystems in the future. (/i for case insensitive)

I think you could put this tip in the WSL config doc.

One could translate a Linux path $WSL_PATH like /usr/include under $subsystem to a Windows path by

PS R:\> ($(get-appxpackage).PackageFamilyName | findstr /i $subsystem) -replace '^', "$`{localappdata`}/Packages/" -replace '$', "/LocalState/rootfs$WSL_PATH"

${localappdata}/Packages/CanonicalGroupLimited.UbuntuonWindows_79rhkp1fndgsc/LocalState/rootfs/usr/include

$subsystem could be

  • UbuntuonWindows
  • openSUSELeap42
  • SUSELinuxEnterpriseServer12

for now.

@bobbrow bobbrow merged commit 6dfa9d6 into microsoft:master Oct 31, 2017
@bobbrow
Copy link
Member

bobbrow commented Oct 31, 2017

Thanks @icylogic. I included your Powershell command in the doc.

@github-actions github-actions bot locked and limited conversation to collaborators Oct 16, 2020
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants