-
Notifications
You must be signed in to change notification settings - Fork 522
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
Launcher cannot retrieve full subsystem settings. #96
Comments
Just curious where it is used. |
Hi! We have a custom routine for both distro installation and later reconfiguration. Currently, the preparation for that routine requires detection of subsystem version (1 or 2) and of graphical capabilities. But that might be require us to look into other aspects, like the default environment variables. For now you can see the usage below: |
I am kind of thinking that mistake (probably). I may be wrong. As far as I can remember, the distributionVersion parameter does not reflect whether the distribution is in WSL1 or WSL2 environment. It reflects lxfs vs. wslfs, old topic. This is undocumented but works. The wslDistributionFlags provides WSL1 vs WSL2. For WSL2, wslDistributionFlags has 0x08 flag or-ed. |
There should be an official way to detect whether wslg is enabled or not without executing any ELF binary or poking a file. |
You are indeed right. Thanks for spotting my bug. Really appreciate it. Yet, just by the It would be nice if the API itself provided a function for that specific piece of information. Would the |
While I totally agree with you, I didn't find any better way other than inspecting sockets. |
Wondering what that will be. |
You can have a look if you want 😅 |
O, I thought AF_VSOCK vs. AF_INET. In my opinion, the /tmp/.X11-unix path is not only for wslg. A program may use AF_UNIX socket even in WSL1 or in WSL2 for X servers only (like vcxsrv). AF_UNIX was added in 17063 build of Windows 10 whereas WSL2 was added 18362 build. |
That sounds as interesting as challenging. AFAIK, AF_VSOCK would help to be sure I'm under WSL 2, but would it tell anything about WSLg? While I can Any great tip like the |
I'm not the right one to comment on that. But if this was not for Ubuntu or any stable software I have some dangerous tricks in my sleeve 🤐 |
Greetings, all!
During development of the Ubuntu launcher we felt the need to retrieve more details from the subsystem configuration (besides the defaut configuration flags), details which are provided by the function
WslGetConfiguration()
, which is not exposed by WslApiLoader. Reference documentation about that function can be found here.We implemented a simple addition to that class, which will be presented shortly as a pull request for your appreciation.
The text was updated successfully, but these errors were encountered: