Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

X11 works with container launched via VSCode but not launched via devcontainers/cli #869

Open
jbcpollak opened this issue Aug 5, 2024 · 2 comments
Assignees
Labels
under-discussion Issue is under discussion for relevance, priority, approach

Comments

@jbcpollak
Copy link

I have a script called devshell (relevant code below), which is intended to start the devcontainer if not always running, then give you a shell into the container.

When I start the container in VSCode, then in a separate terminal (outside vscode) run devshell, I can launch a GUI application like xterm no problem.

If instead, I stop VSCode and the running devcontainer, then run the devshell script below, xterm and other X11 applications do not work. It seems to me devcontainer up does something different than vscode itself when preparing the container for execution.

Here is the relevant except of devshell (the only missing contents are boilerplate setup and making sure we are in the right directory, etc):

devcontainer up --workspace-folder .

WORKDIR=/workspaces/${REPONAME}
CONTAINER_NAME=${REPONAME}_devcontainer

# Run a shell in the container
docker exec -it -e DISPLAY=":0" -w ${WORKDIR} ${CONTAINER_NAME} /bin/bash "$@"
@chrmarti
Copy link
Contributor

chrmarti commented Sep 3, 2024

The X11 forwarding is a feature of the Dev Containers extension for VS Code and not part of the Dev Containers CLI.

@chrmarti chrmarti self-assigned this Sep 3, 2024
@chrmarti chrmarti added the under-discussion Issue is under discussion for relevance, priority, approach label Sep 3, 2024
@jbcpollak
Copy link
Author

Oh that's disappointing. Is there any way to bring it over?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
under-discussion Issue is under discussion for relevance, priority, approach
Projects
None yet
Development

No branches or pull requests

2 participants