-
Notifications
You must be signed in to change notification settings - Fork 846
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
Document API to get list of installed distros, their .exe files and base pathes. #3515
Comments
@Biswa96 - Please do not take a dependency on our registry format, it is subject to change without notice. |
Right, and I'm warning that approach is fraught with peril. |
@benhillis thank you. Do you have plans to provide official API instead? Here is one of my usecases: I want to browse root fs from Windows. I do not want to change it, only browse. The only stable way to do that is to run Linux app and so some IPC, but it seems to be overkill here. Is there any way to find |
That isn't a use case. The reason you want/need to browse the lxss directory is the use case.
You can use WebDAV which is agreed gross overkill but at least all the infrastructure already exists, so from a coding point it isn't too bad. Depends on your... use case. [FWIW I did a PoC thing using the above in early 2017 for which I had grand plans, but shelved it in the hopes that #1524 (UserVoice) was going to work out. Unfortunately it didn't.] |
The shell is invoked with `wsl.exe`, which uses whichever Linux distribution the user has configured as their default. [1] The option is presented to the user when the following conditions are met: 1. `wsl.exe` and `wslconfig.exe` are both found in the system. 2. `wslconfig.exe /list` returns an exit code of zero. I verified that `wslconfig.exe /list` returns a non-zero exit code when the system has no Linux distributions installed. I decided to avoid the registry for detection since that has been discouraged by the WSL developers. [2] Closes desktop#4641 [1]: https://docs.microsoft.com/en-us/windows/wsl/wsl-config#wsl-and-wsl-command [2]: microsoft/WSL#3515
The shell is invoked with `wsl.exe`, which uses whichever Linux distribution the user has configured as their default. [1] The option is presented to the user when the following conditions are met: 1. `wsl.exe` and `wslconfig.exe` are both found in the system. 2. `wslconfig.exe /list` returns an exit code of zero. I verified that `wslconfig.exe /list` returns a non-zero exit code when the system has no Linux distributions installed. I decided to avoid the registry for detection since that has been discouraged by the WSL developers. [2] Closes desktop#4641 [1]: https://docs.microsoft.com/en-us/windows/wsl/wsl-config#wsl-and-wsl-command [2]: microsoft/WSL#3515
wslconfig
output is not documented now, and I can't find any official doc forHKCU:\Software\Microsoft\Windows\CurrentVersion\Lxss
.If I need to switch default distro, run some distro by name or browse its root fs, I need to rely on not documented things.
Please, document API
The text was updated successfully, but these errors were encountered: