树莓派3B+安装Ubuntu Mate 16.04

一、下载镜像html

适用于3B+的ubuntu mate 16.04镜像 Ubuntu Mate SD.zip,百度云连接:git

https://pan.baidu.com/s/1EX_nuQReV9IJuQfvkA9XWAgithub

密码:osekubuntu

二、烧录完成后,HDMI链接电视或屏幕;bash

三、上电开机,配置 语言(英文)、时区点选 中国地图(上海)、WiFi、用户名和密码等;直接点击 下一步continue 便可;网络

 

此处比较坑,千万不要等(只要有电,它能卡在那里一万年),直接点击 取消,会自动重启进入系统;session

四、安装VNC、teamviewer方便,无屏控制;app

首选x11vnc,VNC有不少选择,VNC4server,tigervncserver等等,都不推荐,难装又难用。还有白屏,没法自启动设置等问题。并且VNC4server等不是实时桌面,x11vnc可看到实时桌面,可同屏操做,相似于teamviewer但不用注册帐户,购买商业license;ssh

一键安装:测试

wget https://github.com/longhr/ubuntu1604hub/raw/master/ubuntu1604VNC.sh

chmod u+x ubuntu1604VNC.sh

sudo ./ubuntu1604VNC.sh

中间过程须要设置密码,两步确认,都是按 y 确认便可。

x11vnc实时桌面:

VNC-Server ARM.deb非实时桌面

 

若是担忧下载不畅或无网络,可提早下载VNC、teamviewer deb文件到u盘,系统安装完后(安装时不要插,否则安装完还得插拔一次),直接安装;

连接: https://pan.baidu.com/s/1hJQ96p8AUAi_IwXgSP6kNQ 提取码: hsew

根据本身硬件选合适的包,树莓派 选 ARM;

Ctrl+Alt+T 调出命令终端;

安装VNC-Server后,命令行输入vncserver开启服务,vncserver -server设置密码;

vncserver
sudo vncpasswd -service

设置vncserver开机自启,这样不用每次都vncserver,编辑 /etc/rc.local 在 exit 0 前添加如下内容:        

vncserver

若是VNC链接出现灰白屏,只需把X-manager那行注释掉,最后一行为:mate-session &,sudo reboot重启;

#!/bin/sh
# Uncomment the following two lines for normal desktop:
# unset SESSION_MANAGER
# exec /etc/X11/xinit/xinitrc
[ -x /etc/vnc/xstartup ] && exec /etc/vnc/xstartup
[ -r $HOME/.Xresources ] && xrdb $HOME/.Xresources
xsetroot -solid grey 
vncconfig -iconic &
# x-terminal-emulator -geometry 80x24+10+10 -ls -title "$VNCDESKTOP Desktop" &
        
mate-session &

客户端配置,接入端口为5901或1;

注意:

raspi-config,开始camera ssh remote等接口时,本身先了解清楚需求再开,否则重启后出现彩屏只能再烧录系统了;

躺了两次这个坑得来的经验,不须要的不要随便开;

我淘了一台树莓派3B,测试了3B+ Ubuntu mate16.04 那个变彩屏的系统,结果不像3B+那样直接彩屏,而是登陆到桌面才重启,不断反复,还觉得能使用呢,空欢喜一场;重刷树莓派3B版 Ubuntu mate16.04系统后,也出现自动重启这样的问题,多是电源问题;

http://club.digiic.com/Forum/PostDetail/p-6236.html#divReply

 

Ubuntu mate16.04 的wifi时有时无,有时须要重启才出现;


 

ros安装:

https://www.jianshu.com/p/36a960470b35

 

sudo sh -c 'echo "deb http://packages.ros.org/ros/ubuntu $(lsb_release -sc) main" > /etc/apt/sources.list.d/ros-latest.list'
sudo apt-key adv --keyserver hkp://ha.pool.sks-keyservers.net:80 --recv-key 421C365BD9FF1F717815A3895523BAEEB01FA116
sudo apt-get update
sudo apt-get -y install ros-kinetic-ros-base ros-kinetic-slam-gmapping ros-kinetic-navigation ros-kinetic-xacro ros-kinetic-yocs-velocity-smoother ros-kinetic-robot-state-publisher ros-kinetic-joint-state-publisher ros-kinetic-teleop-twist-*
sudo rosdep init
rosdep update
echo "source /opt/ros/kinetic/setup.bash" >> ~/.bashrc
source ~/.bashrc

复制上面脚本保存至文件install_ros_kinetic.sh,执行sh install_ros_kinetic.sh。

 

树莓派安装系统很简单,可是若是安装ROS系统的话,更新源的时候,源的选择很重要。国内那几个出名的源(清华的、阿里云的等)都不支持armhf。好在从网上找到了一个国内支持armhf的源:

deb http://mirrors.ustc.edu.cn/ubuntu-ports/ xenial main restricted universe multiverse 
deb http://mirrors.ustc.edu.cn/ubuntu-ports/ xenial-updates main restricted universe multiverse 
deb http://mirrors.ustc.edu.cn/ubuntu-ports/ xenial-security main restricted universe multiverse 
deb http://mirrors.ustc.edu.cn/ubuntu-ports/ xenial-backports main restricted universe multiverse

 

参考连接:

Ubuntu 16.04 LTS 一键安装VNC

https://blog.csdn.net/longhr/article/details/51657610?utm_source=blogxgwz1

Ubuntu mate 安装 VNCServer

http://www.linyuting.cn/jingyanfenxiang/Ubuntumatevncserver.html

树莓派3代ROS系统镜像文件下载连接

https://blog.csdn.net/ykevin0510/article/details/77606922

玩转树莓派之在树莓派Jessie系统中安装ROS

https://blog.csdn.net/oyoung_2012/article/details/76422994?utm_source=blogxgwz11

 

ROS与开发板入门教程-树莓派3源码安装Turtlebot(ubuntu mate 16.04+kinetic+Turtlebot)

https://blog.csdn.net/lovedarling/article/details/78474644