You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Create a devcontainer with the following devcontainer.json file:
// For format details, see https://aka.ms/devcontainer.json. For config options, see the// README at: https://github.com/devcontainers/templates/tree/main/src/ubuntu
{
"name": "Ubuntu",
// Or use a Dockerfile or Docker Compose file. More info: https://containers.dev/guide/dockerfile"image": "mcr.microsoft.com/devcontainers/base:jammy",
// Features to add to the dev container. More info: https://containers.dev/features.// "features": {},
// Use 'forwardPorts' to make a list of ports inside the container available locally.// "forwardPorts": [],// Use 'postCreateCommand' to run commands after the container is created.// "postCreateCommand": "uname -a",// Configure tool-specific properties.// "customizations": {},// Uncomment to connect as root instead. More info: https://aka.ms/dev-containers-non-root.// "remoteUser": "root"}
Open the workspace in the devcontainer.
In the devcontainers terminal run the following to install X-11 apps
sudo apt update && sudo apt install -y x11-apps
Try running xcalc
Get the following error
Error: Can't open display:
I'm able to run the same steps within WSL and the xcalc GUI opens and functions as expected.
Within WSL using the docker run command to open the same docker container I can install the X11 apps and run xcalc as expected
The issue started happening a couple months ago though frequency at which error showed up has increased (went from occuring once a week where a computer restart resolved the issue to anytime I try to open a GUI). I am now unable to open any GUIs from VSCode devcontainers.
The text was updated successfully, but these errors were encountered:
Steps to Reproduce:
devcontainer.json
file:sudo apt update && sudo apt install -y x11-apps
xcalc
Error: Can't open display:
xcalc
GUI opens and functions as expected.docker run
command to open the same docker container I can install the X11 apps and runxcalc
as expectedThe text was updated successfully, but these errors were encountered: