ubuntu 通过VNC 显示Raspberry PI界面

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

备注:在window操作系统上:

打开控制台(WIN+R 输入cmd),输入以下命令查看网络接口信息:
arp -a

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、登录的界面截图


评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值