树莓派3B+_Ubuntu Mate18.04_ROS Melodic(一):Ubuntu Mate的初始配置

本文是根据自己实际操作过程中所遇到的问题和解决方法做的记录与总结。
详情请参考:
1、Install Ubuntu MATE 18.04 on Raspberry Pi 3 B+
2、Install ROS Melodic on Raspberry Pi 3
3、Raspberry Pi Tutorials(教程)

一、Install Ubuntu MATE 18.04 on Raspberry Pi 3 B+完成后的相关配置

(可以先看第六步换源,这样下载速度会快一些)

(一) 安装fcitx中文输入法

sudo apt-get install fcitx fcitx-googlepinyin fcitx-module-cloudpinyin fcitx-sunpinyin

切换:CTRL+空格键

(二) 显示器有黑边、更改分辨率等

  1. 文件及路径不一样
    一开始在网上查到的资料说修改 /boot/config.txt。
    但其实我打开 /boot/config.txt后,内容如下:
# Please DO NOT modify this file; if you need to modify the boot config, the
# "usercfg.txt" file is the place to include user changes. Please refer to
# the README file for a description of the various configuration files on
# the boot partition.

# The unusual ordering below is deliberate; older firmwares (in particular the
# version initially shipped with bionic) don't understand the conditional
# [sections] below and simply ignore them. The Pi4 doesn't boot at all with
# firmwares this old so it's safe to place at the top. Of the Pi2 and Pi3, the
# Pi3 uboot happens to work happily on the Pi2, so it needs to go at the bottom
# to support old firmwares.

[pi4]
kernel=uboot_rpi_4_32b.bin
max_framebuffers=2

[pi2]
kernel=uboot_rpi_2.bin

[pi3]
kernel=uboot_rpi_3_32b.bin

[all]
device_tree_address=0x03000000

# The following settings are "defaults" expected to be overridden by the
# included configuration. The only reason they are included is, again, to
# support old firmwares which don't understand the "include" command.
enable_uart=1
cmdline=nobtcmd.txt

include syscfg.txt
include usercfg.txt

发现并没有hdmi_group、hdmi_mode、hdmi_drive或者disable_overscan。但仔细看会发现有提到不建议修改此文件,有关boot的配置在usercfg.txt文件里面设置(其路径:/boot/firmware/usercfg.txt)

原因:应该是安装的系统不一样,我装的是官方给的: ubuntu-mate-18.04.2-beta1-desktop-armhf+raspi-ext4.img.xz)

  1. 但操作是一样的。其中一种做法是:
hdmi_group=2  //将显示模式切换成DMT(显示器模式)
hdmi_mode=82  //1920x1080	60Hz  1080p 

另一种做法是:

disable_overscan=1 

(具体操作参考:
树莓派UbuntuMate如何修改为全屏显示
树莓派有黑边不能全屏解决方法
树莓派显示器分辨率的调整,黑边的修改方法

后来,在某乎发现,早有人总结了。。。戳我戳我

(三) 关于远程连接

第一步:接上显示器,设置好自动登录,并连接好网线或者WiFi(手机热点也行),笔记本也一样。(注:如果没有设置自动登录来跳过登录页面,在没接显示器的情况下,树莓派开机后不会自动连接WIFI)。

第二步:查看树莓派的IP地址
如果你像我一样,使用手机热点的话,可以直接在手机上查看

树莓派3B+_Ubuntu Mate18.04_ROS Melodic(一):Ubuntu Mate的初始配置_第1张图片
在已连接设备里面有:
树莓派3B+_Ubuntu Mate18.04_ROS Melodic(一):Ubuntu Mate的初始配置_第2张图片
第三步:在笔记本上用PuTTY进行远程SSH连接,只需要输入对应的IP地址即可。
树莓派3B+_Ubuntu Mate18.04_ROS Melodic(一):Ubuntu Mate的初始配置_第3张图片
第四步:输入用户名和密码即可远程登录操控树莓派
树莓派3B+_Ubuntu Mate18.04_ROS Melodic(一):Ubuntu Mate的初始配置_第4张图片
第五步:保存账号密码,一键连接登录
将PuTTY创建一个快捷方式在桌面,自己重命名,右键属性->在目标选项后面加上:
用户名@服务器地址 -pw 密码

服务器地址 -l 用户名 -pw 密码;
之后便可双击直接连接登录。
树莓派3B+_Ubuntu Mate18.04_ROS Melodic(一):Ubuntu Mate的初始配置_第5张图片
第六步:用笔记本自带远程桌面连接
输入对应的IP地址、用户名和密码后,提示could not acquire name on session bus。
树莓派3B+_Ubuntu Mate18.04_ROS Melodic(一):Ubuntu Mate的初始配置_第6张图片

  • Ubuntu上VNC没开启?或者没设置显示图形界面?
  • 其他原因?参考

此外,在设置VNC开机自启动时,又意外地发现在 /etc目录下没有rc.local文件——解决办法:Ubuntu 18.04 启用 rc.local 设置开机启动

(六)更换软件源和系统源


$ sudo gedit /etc/apt/sources.list

将每个 http://ports.ubuntu.com/ 都替换为 :
http://mirrors.ustc.edu.cn/ubuntu-ports/  (中科大的源)

$ sudo apt-get update

你可能感兴趣的:(树莓派,raspberry-pi,ROS)