NVIDIA-ISAAC-ROS / isaac_ros_common

Common utilities, packages, scripts, Dockerfiles, and testing infrastructure for Isaac ROS packages.
https://developer.nvidia.com/isaac-ros-gems
Other
195 stars 138 forks source link

DISPLAY environment variable not set inside Docker container #119

Open Hezhexi2002 opened 6 months ago

Hezhexi2002 commented 6 months ago

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:

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.