答案1
根据前面的答案,我可以通过以下方式解决此问题:
export DISPLAY=127.0.0.1:0.0
笔记:
使用:DISPLAY=$(cat /etc/resolv.conf | grep nameserver | awk '{print $2; exit;}'):0.0
尽管:
echo $DISPLAY
我有:
<my_gateway_IP>:0.0.
答案2
添加此内容:
export DISPLAY=$(cat /etc/resolv.conf | grep nameserver | awk '{print $2; exit;}'):0.0