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

1、问题

 

 

2、解决方法,增加如下内容

root@PC1:~/home/test# vim /etc/profile
export DISPLAY=:0.0

 

 

3、立即生效

root@PC1:/home/test# source /etc/profile

 

参考:https://blog.csdn.net/liyangbinbin/article/details/108401389

 

posted @ 2021-10-24 17:58  小鲨鱼2018  阅读(10065)  评论(0编辑  收藏  举报