红联Linux门户
Linux帮助

ubuntu通过VNC显示Raspberry PI界面

发布时间:2016-11-23 11:30:11来源:linux网站作者:wiwa
1、将raspberry连接上路由器,通过以下命令查找路由器网段连接的设备
wiwa@tech:~$ sudo nmap -sP 192.168.31.0-254
Starting Nmap 7.01 ( https://nmap.org ) at 2016-11-22 20:48 CST  
Nmap scan report for XiaoQiang (192.168.31.1)  
Host is up (0.0046s latency).  
MAC Address: 28:6C:07:32:01:60 (Unknown)  
Nmap scan report for 192.168.31.16  
Host is up (0.063s latency).  
MAC Address: B8:27:EB:E4:A2:BC (Raspberry Pi Foundation)  
Nmap scan report for 192.168.31.125  
Host is up (-0.089s latency).  
MAC Address: B8:27:EB:B1:F7:E9 (Raspberry Pi Foundation)  
Nmap scan report for 192.168.31.240  
Host is up.  
Nmap done: 255 IP addresses (4 hosts up) scanned in 2.30 seconds  
 
2、通过SSH登录Raspberry Pi (密码:raspberry):
wiwa@tech:~$ ssh pi@192.168.31.16  
pi@192.168.31.16's password: 
The programs included with the Debian GNU/Linux system are free software;  
the exact distribution terms for each program are described in the  
individual files in /usr/share/doc/*/copyright.
Debian GNU/Linux comes with ABSOLUTELY NO WARRANTY, to the extent  
permitted by applicable law.  
Last login: Tue Nov 22 12:01:37 2016 from 192.168.31.240  
pi@raspberrypi:~ $
 
3、在Raspberry Pi端安装VNC server:
pi@raspberrypi:~ $ sudo apt-get install tightvncserver
 
4、开启Raspberry Pi VNC server端界面(首次开启需要设定密码):
pi@raspberrypi:~ $  sudo vncserver :2 -geometry 800x600 -depth 24
 
5、在ubuntu端安装VNC viewer 客户端:
wiwa@tech:~$ sudo apt-get install xtightvncviewer
 
6、在ubuntu段登录查看Raspberry Pi的界面(输入Raspberry Pi的VNC服务器已设定的密码):
wiwa@tech:~$ xtightvncviewer 192.168.31.125:2  
Connected to RFB server, using protocol version 3.8  
Enabling TightVNC protocol extensions  
Performing standard VNC authentication  
Password:   
Authentication successful  
Desktop name "pi's X desktop (raspberrypi:2)"  
VNC server default format:  
32 bits per pixel.  
Least significant byte first in each pixel.  
True colour: max red 255 green 255 blue 255, shift red 16 green 8 blue 0  
Warning: Cannot convert string "-*-helvetica-bold-r-*-*-16-*-*-*-*-*-*-*" to type FontStruct
Using default colormap which is TrueColor.  Pixel format:  
32 bits per pixel.  
Least significant byte first in each pixel.  
True colour: max red 255 green 255 blue 255, shift red 16 green 8 blue 0
 
7、登录的界面截图
ubuntu通过VNC显示Raspberry PI界面
 
本文永久更新地址:http://www.linuxdiyf.com/linux/26257.html