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

1、问题

2、解决方法

root@PC1:~/home/test# vim /etc/profile

3、立即生效

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

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

原文地址:https://www.cnblogs.com/liujiaxin2018/p/15452030.html