raspi ubuntu mate
https://ubuntu-mate.org/download/
https://ubuntu-mate.org/raspberry-pi/
1、将raspberry连接上路由器,通过以下命令查找路由器网段连接的设备
[cpp] view plain copy 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):
[cpp] view plain copy
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:
[python] view plain copy pi@raspberrypi:~ $ sudo apt-get install tightvncserver
4、开启Raspberry Pi VNC server端界面(首次开启需要设定密码):
[cpp] view plain copy pi@raspberrypi:~ $ sudo vncserver :2 -geometry 800x600 -depth 24
5、在ubuntu端安装VNC viewer 客户端:
[cpp] view plain copy wiwa@tech:~$ sudo apt-get install xtightvncviewer
6、在ubuntu段登录查看Raspberry Pi的界面(输入Raspberry Pi的VNC服务器已设定的密码):
[cpp] view plain copy
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
Making a microSDHC with Windows If you want to make a microSDHC using Windows we recommend:
7-Zip to extract the image. Win32 Disk Imager to write the image. Re-size file system Since Ubuntu MATE 16.04.2 the root parition is automatically resized, to fully utilise the all available space on the microSD card, on first boot.
SSH Since Ubuntu MATE 16.04.2 the OpenSSH server is disabled by default. If you want to enable SSH you can use raspi-config to created a file call ssh in to /boot paritition and reboot.
When you enable SSH via either method explained above sshguard will also be enabled.
Enable and Disable X11 Since Ubuntu MATE 16.04.2 your can disbale/enable the desktop environment using raspi-config.
Redirecting audio output The sound will output to HDMI by default if both HDMI and the 3.5mm audio jack are connected. You can, however, force the system to output to a particular device using raspi-config.
For those of you who want to know how to do this without raspi-config:
For HDMI sudo amixer cset numid=3 2 For 3.5mm audio jack sudo amixer cset numid=3 1 Hardware accelerated video with omxplayer Most videos will play with hardware acceleration using omxplayer which is pre-installed in Ubuntu MATE. However if you have MPEG-2 or VC-1 video video files then you will need MPEG-2 and/or VC-1 licenses from the Raspberry Pi Store.
omxplayer audio redirection Should you want to manually select the output audio deive with omxplayer it can be acieved as follows:
omxplayer over HDMI omxplayer -o hdmi video.mp4 omcplayer over 3.5mm audio jack omxplayer -o local video.mp4 Hardware accelerated video with VLC and ffmpeg Ubuntu MATE 16.04 added OpemMAX IL hardware accelerated video playback to VLC and MMAL hardware accelerated video playback to ffmpeg.
To enable hardware accelerated video playback in VLC go to Tools -> Preferences -> Video and select OpenMax IL. To use hardware accelerated video playback with ffplay you must specify the h264_mmal codec.
ffplay -vcodec h264_mmal video.mp4
Hardware accelerated playback on the Raspberry Pi works by overlaying the video directly to the screen. Therefore there are no onscreen controls for playback control. You’ll need to use the VLC and ffmpeg keyboard shortcuts.
VLC keyboard control ffplay keyboard controls Hardware accelerate video encoding with ffmpeg Since Ubuntu MATE 16.04.2 ffmpeg is shipped with hardware enabled video encoding via the h264_omx encoder. Here is an example:
ffmpeg -f video4linux2 -i /dev/video0 -s 1280x720 -c:v h264_omx output.mp4