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

编程入门 行业动态 更新时间:2024-10-25 08:23:40

qt.<a href=https://www.elefans.com/category/jswz/34/1704515.html style=qpa.xcb: could not connect to display 0"/>

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

问题

docker中启动rviz有问题

$ rviz
qt.qpa.xcb: could not connect to display 0
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: eglfs, linuxfb, minimal, minimalegl, offscreen, vnc, xcb.

Aborted (core dumped)

原来是display不对,估计是之前重装nvidia的驱动,使得display搞错了。在host机器上看下display是多少。

echo ${DISPLAY}
:1

在容器中将display设置为:1

export DISPALY:=1
rviz

搞定

更多推荐

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

本文发布于:2023-11-16 07:32:36,感谢您对本站的认可!
本文链接:https://www.elefans.com/category/jswz/34/1614609.html
版权声明:本站内容均来自互联网,仅供演示用,请勿用于商业和其他非法用途。如果侵犯了您的权益请与我们联系,我们将在24小时内删除。
本文标签:qpa   qt   xcb   display   connect

发布评论

评论列表 (有 0 条评论)
草根站长

>www.elefans.com

编程频道|电子爱好者 - 技术资讯及电子产品介绍!