James Bryant

【转】树莓派3 安装ubuntu-mate

0
阅读(2208)

1、系统安装

1.1、下载ubuntu-mate镜像:https://ubuntu-mate.org/raspberry-pi/

    下载SDFormatterv4:https://www.sdcard.org/downloads/formatter_4/

    下载Win32DiskImager:https://sourceforge.net/projects/win32diskimager/

1.2、准备一张大于8GB的TF卡,使用SDFormatterv4格式化TF卡

1.3、用Win32DiskImager将ubuntu-mate镜像(ubuntu-mate-16.04-desktop-armhf-raspberry-pi.img)写入TF卡中

2、系统配置

2.1、修改文件系统大小

输入sudo fdisk /dev/mmcblk0

输入d 回车

输入2 回车

输入n 回车

输入p 回车

输入2 回车

输入 回车 回车 w 回车

然后重启系统后输入sudo resize2fs /dev/mmcblk0p2

再重启系统

2.2、设置网络文件共享

2.2.1、安装Samba

sudo apt-get install samba
sudo apt-get install smbclient

2.2.2、配置Samba

sudo nano /etc/samba/smb.conf

在文件尾添加:

[share]
comment=this is Linux share directory
path=/home/
public=yes
writable=yes

保存Ctrl+o退出Ctrl+x

2.2.3、启动Samba服务:

sudo /etc/init.d/samba restart

在Windows下访问共享目录:

\\192.168.1.102\share

2.3、设置VNC远程控制

2.3.1、安装tightvncserver

sudo apt-get install tightvncserver

2.3.2、设置密码

vncpasswd

2.3.3、设置开机自启动

sudo nano /etc/init.d/tightvncserver

输入:

复制代码

#!/bin/sh
### BEGIN INIT INFO
# Provides:          tightvncserver
# Required-Start:    $local_fs
# Required-Stop:     $local_fs
# Default-Start:     2 3 4 5
# Default-Stop:      0 1 6
# Short-Description: Start/stop tightvncserver
### END INIT INFO
 
# More details see:
# http://www.penguintutor.com/linux/tightvnc
 
### Customize this entry
# Set the USER variable to the name of the user to start tightvncserver under
export USER='pi'
### End customization required
 
eval cd ~$USER
 
case "$1" in
  start)
    # 启动命令行。此处自定义分辨率、控制台号码或其它参数。
    su $USER -c '/usr/bin/tightvncserver -depth 16 -geometry 960x600 :1'
    echo "Starting TightVNC server for $USER "
    ;;
  stop)
    # 终止命令行。此处控制台号码与启动一致。
    su $USER -c '/usr/bin/tightvncserver -kill :1'
    echo "Tightvncserver stopped"
    ;;
  *)
    echo "Usage: /etc/init.d/tightvncserver {start|stop}"
    exit 1
    ;;
esac
exit 0

复制代码

保存Ctrl+o退出Ctrl+x

2.3.4、设置文件权限,更新开机自启动列表

sudo chmod 777 /etc/init.d/tightvncserver
sudo update-rc.d tightvncserver defaults

2.3.5、在Windows或Android VNC客户端连接:192.168.1.102:5901即可

2.4、设置Windows远程桌面

2.4.1、安装xrdp

sudo apt-get install xrdp

2.4.2、Windows端使用mstsc.exe连接即可

2.5、安装输入法

2.5.1、安装ibus

sudo apt-get install ibus
sudo apt-get install ibus-pinyin

2.5.2、设置ibus输入法:系统设置->语言支持->键盘输入方式系统 改为 IBus

2.6、更新
sudo apt-get update
sudo apt-get upgrade
sudo rpi-update