xdpyinfo | grep ‘name of display‘
xhost +
export DISPLAY=localhost:10.0
Linux 图像界面 unable to open display
原文:https://www.cnblogs.com/dissipate/p/14647467.html