RobinWolf / diy_robotarm_wer24_description

0 stars 0 forks source link

qt.qpa.xcb: could not connect to display :0 #2

Closed bibinthomas007 closed 2 months ago

bibinthomas007 commented 2 months ago

Environment Details:

Docker version: 26.0.0, build 2ae903e Operating System: Dual booted with Ubuntu 22.04LTS Triple booted with Ubuntu and windows

Steps to Reproduce:

Install docker desktop clone diy_robotarm_wer24_description in a folder run ./run.sh inside the diy_robotarm_wer24_description folder.

Additional Information:

echo $DISPLAY output: :0

Actual Error

[rviz2-3] qt.qpa.xcb: could not connect to display :0 [rviz2-3] qt.qpa.plugin: Could not load the Qt platform plugin "xcb" in "" even though it was found. [rviz2-3] This application failed to start because no Qt platform plugin could be initialized. Reinstalling the application may fix this problem. [rviz2-3] [rviz2-3] Available platform plugins are: eglfs, linuxfb, minimal, minimalegl, offscreen, vnc, xcb. [rviz2-3] [ERROR] [rviz2-3]: process has died [pid 63, exit code -6, cmd '/opt/ros/humble/lib/rviz2/rviz2 -d /home/hephaestus/dependencies/diy_robotarm_wer24_description_ws/install/diy_robotarm_wer24_description/share/diy_robotarm_wer24_description/rviz/rviz_config.rviz --ros-args -r __node:=rviz2']. [joint_state_publisher_gui-2] qt.qpa.xcb: could not connect to display :0 [joint_state_publisher_gui-2] qt.qpa.plugin: Could not load the Qt platform plugin "xcb" in "" even though it was found. [joint_state_publisher_gui-2] This application failed to start because no Qt platform plugin could be initialized. Reinstalling the application may fix this problem. [joint_state_publisher_gui-2] [joint_state_publisher_gui-2] Available platform plugins are: eglfs, linuxfb, minimal, minimalegl, offscreen, vnc, xcb. [joint_state_publisher_gui-2] [ERROR] [joint_state_publisher_gui-2]: process has died [pid 61, exit code -6, cmd '/opt/ros/humble/lib/joint_state_publisher_gui/joint_state_publisher_gui --ros-args']. Screenshot from 2024-04-12 09-50-58 Screenshot from 2024-04-12 09-50-58

Conclusion:

since 'echo $DISPLAY' gives the output: :0 in my case. I think i want to install some other packages with in the container.

bibinthomas007 commented 2 months ago

The issue is solved. The solution is dont use docker desktop, only install docker engine.

In the context of Docker Desktop, the error message "Unit docker.service could not be found" is not unexpected, as Docker Desktop manages the Docker daemon differently compared to a traditional Docker engine installation.