kasmtech / workspaces-images

Other
730 stars 241 forks source link

Cannot run VS Code on a WSL Kasm installation #47

Closed franzbischoff closed 1 year ago

franzbischoff commented 1 year ago

When running the VSCode workspace, it fails to run the vscode app.

The reason was found on the container logs:

Do you want to continue anyway? [y/N] To use Visual Studio Code with the Windows Subsystem for Linux, please install Visual Studio Code in Windows and uninstall the Linux version in WSL. You can then use thecodecommand in a WSL terminal just as you would in a normal command prompt.

This happens because KASM is installed on a WSL environment, and the kernel name (uname -r) propagates inside the containers, and vscode thinks it is being called on WSL.

Proposal to fix it:

add on workspace configuration (Docker Run Config Override (JSON)) the following:

{
  "environment": {
    "DONT_PROMPT_WSL_INSTALL": "No_Prompt_please"
  }
}

Best regards.

j-travis commented 1 year ago

Thank you for the report and the proposed fix.

thelamer commented 1 year ago

This has been added to all the images with vscode baked in. https://github.com/kasmtech/workspaces-images/commit/0eb9bc3b367a192fbf95be0ddcabf9d3194a7248