docker / for-linux

Docker Engine for Linux
https://docs.docker.com/engine/installation/
755 stars 86 forks source link

Problem with Docker display and GUI apps with Qt Platform in ROS #1478

Open developajarit opened 11 months ago

developajarit commented 11 months ago

Hello everyone! I am using Docker on Ubuntu 20.04. Also, I am using the ROS Noetic Image in Docker. (because I am practicing with Docker). I use 'docker pull ros:noetic' to install ros:noetic image.

I'm going to explain the steps I follow to open a GUI application like RVIZ:

  1. I create a docker containner with the image of ros:noetic with 'docker run -it ros:noetic
  2. When I am inside te containner, y use 'source /opt/ros/noetic/setup.bash', then I run 'sudo apt-get update'.
  3. When this has finalized, I run 'sudo apt-get install ros-noetic-rviz' to install RVIZ
  4. After that, I run roscore with 'roscore'
  5. Then, I open a new terminal and I use 'docker exec -it (containner name) bash
  6. I repeat 'source /opt/ros/noetic/setup.bash' in this containner and then I run 'rosrun rviz rviz'
  7. And here is the error:

qt.qpa.xcb: could not connect to display qt.qpa.plugin: Could not load the Qt platform plugin "xcb" in "" even though it was found. This application failed to start because no Qt platform plugin could be initialized. Reinstalling the application may fix this problem.

Available platform plugins are: dxcb, eglfs, linuxfb, minimal, minimalegl, offscreen, vnc, wayland-egl, wayland, wayland-xcomposite-egl, wayland-xcomposite-glx, xcb.


I see some issues like this but it didn't give me the solution... (I am a begginer in this)

thisiseshan commented 10 months ago

Running into the same issue here