在我的RPI上,我想开始收听VNCViewer反向连接。
我的.sh文件:
sudo vncviewer -FullScreen -listen 5901
当我手动启动脚本时,它可以工作。当我使用自动启动选项或crontab时,它没有。无论我在重新启动时还是每分钟使用它,我都会在日志中得到它:
VNC(R) Viewer 6.17.731 (r29523) ARMv6 (Aug 3 2017 18:31:30)
Copyright (C) 2002-2017 RealVNC Ltd.
RealVNC and VNC are trademarks of RealVNC Ltd and are protected by trademark
registrations and/or pending trademark applications in the European Union,
United States of America and other jurisdictions.
Protected by UK patent 2481870; US patent 8760366; EU patent 2652951.
See https://www.realvnc.com for information on VNC.
For third party acknowledgements see:
https://www.realvnc.com/docs/6/foss.html
<11> 2019-09-17T10:08:01.963Z raspberrypi vncviewer[1875]: vncviewer: unable to open display ""
<11> 2019-09-17T10:08:01.963Z raspberrypi vncviewer[1875]: TXMsgBox: unable to open display ""
<11> 2019-09-17T10:08:01.963Z raspberrypi vncviewer[1875]: TXMsgBox: unable to open display ""
我也尝试使用Python子进程脚本。同样的错误。为什么什至不尝试打开任何东西时,vncviewer无法打开显示?我只想开始听。 问候