RDK X3(旭日X3派) qt.qpa.xcb: could not connect to display

当我们给RDK X3烧写Desktop版本镜像,写了一个带有imshow的OpenCV程序,使用ssh远程开发时运行这个程序,本以为我们的图片窗口会乖乖的展示在HDMI的显示器上,但是遇到了报错:

qt.qpa.xcb: could not connect to display 
qt.qpa.plugin: Could not load the Qt platform plugin "xcb" in "/usr/local/lib/python3.8/dist-packages/cv2/qt/plugins" 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: xcb.
Aborted

这时候需要作如下设置:
step1:ssh登陆到X3
RDK X3系统镜像有两个用户:一个sunrise,一个root。
而桌面环境登录的用户是sunrise,所以ssh登录也登录到sunrise

step2:设置允许别的用户启动窗体程序

xhost +

step3:设置窗口程序要输出的显示器:

export DISPLAY=:0.0

这时候我们再去ssh终端中运行一个带有imshow的OpenCV程序,就可以成功运行了,窗口会显示在xfce桌面上,可以通过VNC去看。

相关推荐

  1. RDK X3(旭日X3) qt.qpa.xcb: could not connect to display

    2024-06-06 00:22:11       11 阅读
  2. 视觉循迹小车(旭日x3、opencv)

    2024-06-06 00:22:11       15 阅读
  3. 视觉循迹小车(旭日x3、摄像头、循迹)

    2024-06-06 00:22:11       20 阅读

最近更新

  1. TCP协议是安全的吗?

    2024-06-06 00:22:11       18 阅读
  2. 阿里云服务器执行yum,一直下载docker-ce-stable失败

    2024-06-06 00:22:11       19 阅读
  3. 【Python教程】压缩PDF文件大小

    2024-06-06 00:22:11       18 阅读
  4. 通过文章id递归查询所有评论(xml)

    2024-06-06 00:22:11       20 阅读

热门阅读

  1. axios的基本使用

    2024-06-06 00:22:11       11 阅读
  2. Python | R 雌雄配对和鱼仔变异马尔可夫链

    2024-06-06 00:22:11       9 阅读
  3. 「前端+鸿蒙」核心技术HTML5+CSS3(八)

    2024-06-06 00:22:11       8 阅读
  4. Web前端开发基础笔记(6)

    2024-06-06 00:22:11       8 阅读
  5. CentOS 8 (stream) 迁移到 其他开源linux almalinux

    2024-06-06 00:22:11       8 阅读
  6. 基于单片机的脉搏测量仪毕业设计

    2024-06-06 00:22:11       8 阅读
  7. Kafka Streams介绍及在idea中的配置

    2024-06-06 00:22:11       12 阅读
  8. python内对sqlite3数据库表删除某几列相同的行index

    2024-06-06 00:22:11       10 阅读
  9. 除visio以外的几款好用流程图绘制工具

    2024-06-06 00:22:11       10 阅读
  10. 用队列实现栈-力扣

    2024-06-06 00:22:11       10 阅读
  11. 【git】常用命令

    2024-06-06 00:22:11       7 阅读
  12. Django 目录

    2024-06-06 00:22:11       8 阅读
  13. CMake是怎么找到Qt相关模块的

    2024-06-06 00:22:11       9 阅读
  14. 深入探讨Qt中的容器类:QList与QVector

    2024-06-06 00:22:11       10 阅读