cypress-documentation
                                
                                 cypress-documentation copied to clipboard
                                
                                    cypress-documentation copied to clipboard
                            
                            
                            
                        Windows Subsystem for Linux (WSL2) information does not cover WSLg
Subject
Guides > References > Advanced Installation
Description
The Advanced Installation information section Windows Subsystem for Linux is outdated due to the release of Windows Subsystem for Linux GUI (WSLg).
This provides a GUI environment for WSL2 out-of-the-box.
Installation information for WSLg is available on
- GitHub: Windows Subsystem for Linux GUI
- Microsoft Learn: Run Linux GUI apps on the Windows Subsystem for Linux
Existing WSL installations can be updated to use WSLg. New WSL installations automatically use WSLg.
Suggestion
Review this section. Probably major parts can be replaced.
In https://github.com/cypress-io/cypress/issues/7065#issuecomment-1622410301 @nagash77 wrote:
At this point in time Cypress does not officially support WSL/WSL2. I am going to close this until such time that we decide to fully support WSL/WSL2
This is not mentioned in the documentation https://docs.cypress.io/guides/references/advanced-installation#Windows-Subsystem-for-Linux
So a comment would be necessary here. Either explicitly saying it's not supported, or perhaps saying it's experimental. It depends whether you want to allow / encourage its use and whether you want to accept issues for this environment or not.
While I have got it to work using WSLg, The configuration described in the documentation no longer works unless you add some additional configuration to your WSL instance telling WSL to not use WSLg and allowing you to use VcxSrv.
As far as I can tell you need to add the following to your wsl.conf but I havnt managed to get it working with VcxSrv myself, I did however come right with WSLg...
[wsl2]
guiApplications=false 
@NoxRammus
Is there any advantage to using VcXsrv instead of WSLg?
@NoxRammus
Is there any advantage to using
VcXsrvinstead ofWSLg?
None that I am aware of, I think the only benifit is IF there is another non-wsl based use that you have for the dedicated VcXsrv application so that you can use the same Xsrv application for both.
@NoxRammus
Thanks for your feedback! So if Cypress decides it will support WSL2, then it would make sense to replace the information about VcXsrv with instructions for using WSLg.
@MikeMcC399
Its a pleasure!
Yeah I think that makes sense.
If however it is decided not to support WSL2, I think a short note mentioning that it is possible but not maintained here (etc. etc.) should be added in its place.
There will almost definitally be a guide available online somewhere, but having incorrect configuration information on the official docs isnt great.
Does the Cypress team have any feedback on this issue?
I would suggest completely removing the long description to setting up VcXsrv and replacing it by a one-liner referring instead to https://github.com/microsoft/wslg (WSLg).
Since WSL2 now comes with its own X11 server (WSLg) as standard there is no need for a long description of how to install an alternate X11 server VcXsrv in the Cypress documentation.  https://github.com/microsoft/wslg/blob/main/README.md comprehensively documents what a user would need to do in order to use WSLg as X11 server in a Windows Subsystem for Linux (WSL2) environment.
- This is also related to https://github.com/cypress-io/cypress-documentation/issues/5489 that is also waiting for some feedback from the Cypress team.
- PR #5756 is submitted to update the WSL documentation to cover WSLg and remove the complex description about how to use VcXsrv.