Skip to content

When I switch from the default user to root, vscode cannot be started #9854

@Zcaic

Description

@Zcaic

Windows Version

Microsoft Windows [Version 10.0.19045.2728]

WSL Version

1.1.3.0

Are you using WSL 1 or WSL 2?

  • WSL 2
  • WSL 1

Kernel Version

5.15.90.1

Distro Version

Ubuntu22.04

Other Software

No response

Repro Steps

  1. When I start wsl as the default user, wsl has a Windows environment variable and can start vscode.
  2. However, when I switch to root, the Windows environment variables are missing, so vscode cannot be started.
  3. When I switch back to the user directory, the Windows environment variables are still missing. So that I could not start vscode either.

Expected Behavior

I want to know how to preserve or load Windows environment variables after I switch users.

Actual Behavior

Windows environment variables have disappeared, so that vscode cannot be started.

Diagnostic Logs

No response

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions