cypress-documentation icon indicating copy to clipboard operation
cypress-documentation copied to clipboard

Windows Subsystem for Linux (WSL2) information does not cover WSLg

Open MikeMcC399 opened this issue 2 years ago • 7 comments

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

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.

MikeMcC399 avatar Jul 02 '23 08:07 MikeMcC399

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

image

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.

MikeMcC399 avatar Jul 05 '23 20:07 MikeMcC399

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 avatar Jul 13 '23 13:07 NoxRammus

@NoxRammus

Is there any advantage to using VcXsrv instead of WSLg?

MikeMcC399 avatar Aug 28 '23 11:08 MikeMcC399

@NoxRammus

Is there any advantage to using VcXsrv instead of WSLg?

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 avatar Aug 29 '23 06:08 NoxRammus

@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 avatar Aug 29 '23 14:08 MikeMcC399

@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.

NoxRammus avatar Aug 29 '23 15:08 NoxRammus

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.

MikeMcC399 avatar Oct 17 '23 10:10 MikeMcC399

  • PR #5756 is submitted to update the WSL documentation to cover WSLg and remove the complex description about how to use VcXsrv.

MikeMcC399 avatar Mar 19 '24 09:03 MikeMcC399