Skip to content

In container I get Error: Can't open display: #1385

@virzak

Description

@virzak

Windows build number:

26200.6899

Your Distribution version:

24.04

Your WSL versions:

🚀 wsl --version
WSL version: 2.6.2.0
Kernel version: 6.6.87.2-1
WSLg version: 1.0.71
MSRDC version: 1.2.6353
Direct3D version: 1.611.1-81528511
DXCore version: 10.0.26100.1-240331-1435.ge-release
Windows version: 10.0.26200.6899

Steps to reproduce:

  1. Following instructions from https://github.com/microsoft/wslg/blob/b836effa32844bc32bc858e8dd1c5360791171a5/samples/container/Containers.md
  2. Followed the xclock instructions to the point and got Error: Can't open display:
  3. Tried alternatives like
podman run -it --rm -e DISPLAY=$DISPLAY -v /tmp/.X11-unix:/tmp/.X11-unix ubuntu bash -c "apt update && apt install -y x11-apps && xclock"
  1. tried both podman and docker with and without sudo

Nothing worked.

Please help

When I am not using a container, open in ubuntu distro in WSL and run xclock, everything works perfectly.

WSL logs:

No response

WSL dumps:

No response

Expected behavior:

No response

Actual behavior:

Error: Can't open display:

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions