raspberry--VNC遠程桌面控制,拒絕連接connect:connect refused

window系統使用VNC viewer(注意區別viewer和server版本)

官網下載地址:

https://www.realvnc.com/en/connect/download/viewer/

raspberry系統需要安裝realvnc-vnc-server:

sudo apt install realvnc-vnc-server
pi@pi:~ $ apt list --installed | grep vnc

WARNING: apt does not have a stable CLI interface. Use with caution in scripts.

realvnc-vnc-server/stable,now 6.4.1.40826 armhf [installed]
realvnc-vnc-viewer/stable,now 6.19.325.40889 armhf [installed]

出現,拒絕連接connect:connect refused的錯誤,是因爲每次重啓需要啓動vncserver服務

pi@pi:~ $ vncserver
pi@pi:~ $ vncserver
VNC(R) Server 6.4.1 (r40826) ARMv6 (Mar 13 2019 16:35:06)
Copyright (C) 2002-2019 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
OS: Raspbian GNU/Linux 10, Linux 4.19.66, armv7l

On some distributions (in particular Red Hat), you may get a better experience
by running vncserver-virtual in conjunction with the system Xorg server, rather
than the old version built-in to Xvnc. More desktop environments and
applications will likely be compatible. For more information on this alternative
implementation, please see: https://www.realvnc.com/doclink/kb-546

Running applications in /etc/vnc/xstartup

VNC Server catchphrase: "Guitar exile motif. Oasis bicycle total."
             signature: 32-56-16-4c-2b-ba-54-72

Log file is /home/pi/.vnc/pi:2.log
New desktop is pi:2 (192.168.1.XXX:2)

注意最後一行,登錄192.168.1.XXX:2即可登錄成功 (提示XXX是因爲不想暴露IP地址)

 

發表評論
所有評論
還沒有人評論,想成為第一個評論的人麼? 請在上方評論欄輸入並且點擊發布.
相關文章