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

DISPLAY environment variable not set inside Docker container #119

Open
Hezhexi2002 opened this issue Apr 22, 2024 · 0 comments
Open

DISPLAY environment variable not set inside Docker container #119

Hezhexi2002 opened this issue Apr 22, 2024 · 0 comments

Comments

@Hezhexi2002
Copy link

Description:
The current implementation of the run_dev.sh script attempts to pass the host's DISPLAY environment variable to the Docker container by adding the "-e DISPLAY=$DISPLAY" argument to the DOCKER_ARGS array. However, after modifying the script and recreating the container, the DISPLAY environment variable is still not set inside the container.

Steps to reproduce:

  1. Modify the run_dev.sh script to include the following line:
    DOCKER_ARGS+=("-e DISPLAY=$DISPLAY")

  2. Run the modified run_dev.sh script to create a new Docker container.

  3. Inside the container, run echo $DISPLAY.

Expected behavior:
The echo $DISPLAY command should output the value of the host's DISPLAY environment variable.

Actual behavior:
The echo $DISPLAY command outputs an empty string, indicating that the DISPLAY environment variable is not set inside the container.

Additional information:

  • Host operating system: Ubuntu 20.04.6 LTS aarch64
  • Docker version: 26.0.2, build 3c863ff

To work around this issue, I currently have to manually set the DISPLAY environment variable inside the container using export DISPLAY=:0. However, this should not be necessary if the run_dev.sh script is correctly passing the host's DISPLAY environment variable to the container.

Please advise on how to properly pass the host's DISPLAY environment variable to the Docker container so that it is accessible inside the container without requiring manual intervention.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant