Skip to content

VSCode fails to start after WSL update because /run/user/1000 is not writable #48

Description

@sebsgr

Description

After updating to a newer WSL version, VSCode can no longer start correctly inside a Codchi CodeMachine. VSCode reports an error stating that the path /run/user/1000 is not writable.

WSL Version:

WSL-Version: 2.7.8.0
Kernelversion: 6.18.33.1-1
WSLg-Version: 1.0.73.2
MSRDC-Version: 1.2.6676
Direct3D-Version: 1.611.1-81528511
DXCore-Version: 10.0.26100.1-240331-1435.ge-release
Windows-Version: 10.0.26200.8655

The issue appears to be caused by the user runtime directory not being initialized or kept available correctly for the codchi user. As a result, /run/user/1000 is missing.

Image

Current workaround

The issue can be fixed by enabling linger for the codchi user in the Nix configuration:

users.users.codchi.linger = true;

Afterwards, the CodeMachine or system needs to be rebuilt.

Proposed solution

Codchi should automatically enable linger for the default codchi user, or include this setting in the generated Nix configuration for WSL-based CodeMachines:

users.users.codchi.linger = true;

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