樹莓派3B+通過VNC和筆記本共享螢幕
阿新 • • 發佈:2019-01-08
有錯的地方,或者不同意見的,煩請留言,或者發郵箱。
郵箱地址:[email protected]
—————————————————————————————————
還是在我的樹莓派安裝的基礎上,因為沒有買屏,所以就使用我筆記本的屏。
前提:
除了我的安裝博文上提到的,現在什麼都不需要,給樹莓派上電就行;
另外,我筆記本系統是arch linux,參考請注意。
兩種方法,第一種是失敗的,可跳過,但是因為是我係統獨有的,所以我也順便寫一下,如果誰願意嘗試,成功了,煩請告訴我;
第二種是成功的,應該是通用的,反正官網上只有linux,沒有區分xxlinux。
第一種:tigerVNC
a,官網怎麼下載的,自己去找
官網:http://www.tightvnc.com/news.php
b,命令下載
[[email protected] ~]$ sudo pacman -S tigervnc
輸入y,解決依賴,安裝就好。
安裝好之後開啟,
[[email protected] 下載]$ vncviewer 192.168.43.200 TigerVNC Viewer 64-bit v1.9.0 Built on: 2018-07-20 14:32 Copyright (C) 1999-2018 TigerVNC Team and many others (see README.rst) See http://www.tigervnc.org for information on TigerVNC. Thu Dec 27 14:33:36 2018 DecodeManager: Detected 4 CPU core(s) DecodeManager: Creating 4 decoder thread(s) CConn: 已連線到主機 192.168.43.200 的埠 5900 CConnection: Server supports RFB protocol version 5.0 CConnection: Using RFB protocol version 3.8 CConnection: No matching security types CConn: No matching security types
不知道是怎麼回事。
第二種:realVNC
官網:https://www.realvnc.com/en/connect/download/viewer/
第一步: 開啟樹莓派的vnc功能
[email protected]:~ $ sudo raspi-config
選單
a,選擇5 Interfacing Options進入
b,選擇P3 VNC
c,Would you like the VNC Server to be enabled?
選擇yes
d,The VNC Server is enabled?
選擇ok
e,選擇finish
[email protected] :~ $ vncserver
...
...
...
Log file is /home/pi/.vnc/raspberrypi:1.log
New desktop is raspberrypi:1 (192.168.43.200:1)
[email protected]:~ $
第二步:筆記本下載realVNC,並加可執行許可權,執行:
[[email protected] 下載]$ chmod +x VNC-Viewer-6.18.907-Linux-x64
[[email protected] 下載]$ ./chmod +x VNC-Viewer-6.18.907-Linux-x64
這個時候就蹦出一個視窗,讓你“enter a VNC server address or search”,輸入你樹莓派的ip,其他的根據提示做就是了,很傻瓜,所以我這裡就不再說了。
講實話,樹莓派的桌面有點醜。
第三步:如果需要的話調整一下桌面的解析度。
[email protected]:~ $ sudo raspi-config
a,選擇 7 Advanced Options
b, 選擇 A5 Resolution
c, 選擇任意一個(我這邊選了1280x720,應該選和你筆記本解析度差不多的)
d, The solution is set to DMT mode 16
e, 選擇finish
f, would you like to reboot now?
需要現在重啟就選擇yes
也有人用vncserver -geometry 1280x1024,但是我這邊沒有什麼效果。