for-linux icon indicating copy to clipboard operation
for-linux copied to clipboard

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

Open developajarit opened this issue 1 year ago • 1 comments

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)

developajarit avatar Dec 21 '23 10:12 developajarit

Running into the same issue here

thisiseshan avatar Jan 24 '24 04:01 thisiseshan