Build Ubuntu 20.04 LTS desktop environment on Raspberry Pi 4 (+ Japanese)

Introduction

This article is for those who ** "I want to use Ubuntu 20.04 LTS with Raspberry Pi in a desktop environment" **.

Last time, I wrote ** Article to install Ubuntu Desktop 20.10 on Raspberry Pi **, This time, apart from that, we will build a desktop environment for Ubuntu 20.04 LTS on Raspberry Pi 4 **. ** Both are Raspberry Pis that allow Ubuntu to be used in a desktop environment **, The specifications and difficulty level are different.

-** People who recommend this ** article --I want to use Ubuntu in a desktop environment. -I want to use ** LTS ** (minimum 5 years support).
(Ubuntu 20.10 will only be supported for a minimum of 9 months until January 2021) -** I want to use something with abundant information .
(Ubuntu 20.10 has just been released, so there is little information)

-
Last time ** article is recommended (Install Ubuntu Desktop 20.10 on RaspberryPi4) --I want to use Ubuntu in a desktop environment. ――I don't know much, but anyway ** Easy ** I want to install and use Ubuntu with Raspberry Pi.

Compared to the previous method **, this method is a little more difficult **. If you read this article and think "it seems impossible ...", you may try installing Ubuntu using the previous method and try again after getting used to Linux and command operations. (Maybe if you're a complete beginner, I think it's a good idea to start with Raspberry PiOS)

What you prepared

-[LABISTS RaspberryPi4B (4GB) Starter Kit](LABISTS Raspberry Pi 4 ...) ――Even if you don't buy this set, all you need is the Raspberry Pi 4 main unit, power adapter, microHDMI cable, SD card, etc.

procedure

I said, "Give the Raspberry Pi a desktop environment for Ubuntu 20.04 LTS." Versions prior to Ubuntu 20.10 are not officially compatible with Raspberry Pi, so This time, it will be in the form of ** "UbuntuServer20.04LTS" + "UbuntuMATE desktop environment" **.

It seems complicated, but basically I think it's okay if you do the following in order.

1. Install Raspberry Pi Imager

First, access the Raspberry Pi Imager Download Page on your PC. Click "Download for Windows". Launch the downloaded installer and click "Install" and "Finish". I think that Raspberry Pi Imager will start as it is.

2. Write to SD card with Raspberry Pi Imager

When the Raspberry Pi Imager starts, select the OS and SD card and write. After inserting the SD card into the PC -"CHOOSE OS"> "Ubuntu"> "Ubuntu Server 20.04.1 LTS (RPi 3/4)" ・ "CHOOSE SD CARD"> "SD card you want to write" choose. Click "WRITE" to start writing. It took me an hour to finish writing. Let's wait patiently. After a while, a message will be displayed stating that the writing was successful. Raspberry Pi Imager v1.4 2020_11_14 14_07_05.png

3. Start Ubuntu Server on Raspberry Pi 4 / Login

After writing to the SD card, insert the SD card into the Raspberry Pi. continue ・ Power adapter ・ Display (microHDMI cable) ·keyboard ·mouse ・ (LAN cable) After connecting, turn on the power.

After a lot of white letters are displayed on a black background

Ubuntu login: 

Is displayed, it is OK.

Log in with the account name "ubuntu" and password "ubuntu". Then you will be asked to change your password, so enter your new password. If all goes well, you will see "ubuntu @ ubuntu: ~ $" as shown below.

Ubuntu login: ubuntu
Password: ubuntu

You are required to change your password immediately (administrator enforced)
Changing password for ubuntu.
Current password: ubuntu
New password: "new password"
Retype new password: "new password"
Welcome to Ubuntu 20.04.1 LTS (GNU/Linux 5.4.0-1015-raspi aarch64)
:
: (abridgement)
:
ubuntu@ubuntu:~$

4. (WiFi settings)

If you have a LAN cable connected, skip this item.

If you do not connect the LAN cable, you need to connect to WiFi. If you stumble, this ** WiFi setting is the most likely to stumble **. If possible, we recommend ** wired connection **.

Create / edit 99-cloud-init.yaml with vi in / etc / netplan.

For those who don't know how to use vi, this site is organized in an easy-to-understand manner. For the time being, if you know the i key (insert) / x key (delete one character) /: wq key (save and exit) /: q! Key (exit without saving), you can edit it somehow.

Also, at this stage, the US keyboard layout is used, so if you try to input as it is with the JIS keyboard, it will not work. The arrangement of symbols is particularly different, as in this site. Press the corresponding key. Among the ones I use this time, is it about :? Press + on your keyboard to enter:. (I proceeded with this section without keyboard settings, but maybe I should have changed the settings)

First, open 99-cloud-init.yaml in vi.

ubuntu@ubuntu:~$ sudo vi /etc/netplan/99-cloud-init.yaml

When you open it, enter the contents below.

network:
    ethernets:
        eth0:
            dhcp4: true
            optional: true
    version: 2
    wifis:
        wlan0:
            dhcp4: true
            optional: true
            access-points:
                "SSID name":
                    password: "password"

Save with: wq and when you're done, apply the settings and restart.

ubuntu@ubuntu:~$ sudo netplan apply
ubuntu@ubuntu:~$ sudo reboot

5. Install ubuntu-mate-desktop

I will update the system. If you see characters such as error, failed, Not Found, it is highly possible that the network settings have not been completed.

ubuntu@ubuntu:~$ sudo apt update
ubuntu@ubuntu:~$ sudo apt full-upgrade -y

If the update is successful, restart it once.

ubuntu@ubuntu:~$ sudo reboot

After logging in again, install the desktop environment with the command below. It seems that there are various types of desktop environments such as Lubuntu, Kubuntu, Xubuntu, etc. This time I chose Ubuntu MATE. By the way, the reading of MATE is "mate".

ubuntu@ubuntu:~$ sudo apt install ubuntu-mate-desktop

Along the way, you will be asked if you want "gdm3" or "lightdm". Following the pioneer, I chose "gdm3". After leaving it for several tens of minutes, restart it when the installation is completed.

ubuntu@ubuntu:~$ sudo reboot

7. Select Ubuntu MATE and log in

After restarting, the login screen will be displayed. Before entering the password, click the gear mark at the bottom right and select "MATE". image.png When you log in, you will see a desktop screen like the one below. If your desktop screen is deep blue, you probably forgot to select "MATE". image.png With the above, we have successfully built the desktop environment of Ubuntu 20.04LTS on Raspberry Pi 4. Good work.

8. Japanese localization

Probably most of the people reading this article want to use it in Japanese, so I will also write the procedure for Japanese localization.

8.1. Language Support Open Menu> Preferences> Language Support in the upper left. image.png Click Install / Remove Languages ... Check Japanese and press Apply. image.png Japanese will be added to the Language for menus and windows: field, so Drag it to the top of English. Then click Apply System-Wide. Also change Keyboard input method system: to fcitx. image.png Next, open the Regional Formats tab, change Dislay numbers ... to Japanese, and Apply System-Wide. image.png Reboot to apply the settings. If you can set it properly, the characters in the menu should be in Japanese. When you restart, you will be asked if you want to name the desktop or document folder in Japanese. I don't like the Japanese folder name, so I chose "Keep the old name". image.png

8.2. Keyboard

If you keep the default, it will be a US keyboard, so change it to a Japanese keyboard.

Open the upper right keyboard mark> Current Input Method Settings. image.png Press the + mark at the bottom left to add "Keyboard-Japanese". image.png Move "Keyboard-Japanese" to the top. You can delete "Keyboard-English". image.png

8.3. Time

Change the time zone to Japan to match the time in Japan.

Open Menu> Settings> Time And Date Manager. image.png Click Edit to set the time zone to Japan. image.png It is OK if the time on the upper right is the current time in Japan.

9. Bonus (installation of chromium)

It's a big deal, so let's do something before we finish here. I will try to install chromium. chromium is an open source web browser on which Google Chrome is based.

Search from the menu or press Ctrl + Alt + T to open "MATE Terminal".

ubuntu@ubuntu:~$ sudo apt install chromium-browser

Install with.

ubuntu@ubuntu:~$ chromium

You can open chromium with.

in conclusion

This time, I built the desktop environment of Ubuntu 20.04LTS on Raspberry Pi 4. In the future, I'm thinking of installing ROS and playing around with it. I would appreciate it if you could point out any major mistakes in this article.

What I used as a reference

The 624th installation of Ubuntu for desktop on Raspberry Pi 4 Installing Raspberry Pi 4 and Ubuntu Server + Desktop I installed Ubuntu MATE to use the OS of Raspberry Pi 4 as a desktop PC Wifi setting of Ubuntu Server (Raspberry Pi) ~ remote connection [Ubuntu] Stop editing /etc/netplan/50-cloud-init.yaml Detailed summary of vi commands [Linux command collection] Differences between US keyboards and Japanese keyboards Live USB "Ubuntu MATE 18.10" Easy to translate into Japanese ... Settings can be saved!

Recommended Posts

Build Ubuntu 20.04 LTS desktop environment on Raspberry Pi 4 (+ Japanese)
Build mate desktop environment on ec2 with terraform (Ubuntu 20.04LTS)
Put Ubuntu 20.04.1 on Raspberry Pi 4
Japanese input on Ubuntu20.04 Desktop
Build a XAMPP environment on Ubuntu
Headless install of Ubuntu 20.10 on Raspberry Pi
Serially connect to Ubuntu on Raspberry Pi
Install Ubuntu Core 18 on Raspberry Pi 2 Model B
[Java] Build Java development environment on Ubuntu & check execution
How to build a Pytorch environment on Ubuntu
Apache2 on Ubuntu20.04 LTS
Build Zabbix on Ubuntu 20.04
Setting up the FreeBSD desktop environment on Ubuntu + qemu
Install Docker on Raspberry Pi
Building WebGIS on Ubuntu20.04 LTS
Build VNC Server on Ubuntu 20.04
Record video on ubuntu18.04 LTS
Installing OpenMX on Ubuntu 18.04.5 LTS
Install Ubuntu Desktop 20.10 on RaspberryPi4
Ubuntu on Windows build speed
Install raspi-config on Ubuntu 20.04 (LTS)
Install WordPress 5.5 on Ubuntu 20.04 LTS
Minecraft server on Raspberry Pi 4
Laravel environment construction (Ubuntu 18.04 LTS)
The key to running Docker on Raspberry Pi 4 (Ubuntu server 20.04)
Install MariaDB on Raspberry Pi OS
Install Cloud9 on Raspberry pi 4 and set up Rails development environment
Build the latest Samba 4 on Ubuntu 20.04
Try putting CentOS 8 on Raspberry Pi 3
20.10 is better than 20.04 for USB booting Ubuntu on Raspberry Pi 4B
Note: setting javaMail on Raspberry Pi
Wake on Lan settings on Ubuntu 20.04.1 LTS
Create a development environment for Ruby 3.0.0 and Rails 6.1.0 on Ubuntu 20.04.1 LTS
How to build vim on Ubuntu 20.04
Build ffmpeg 4.3.1 on Ubuntu for Windows
Build Unity development environment on docker
Building a Deep Learning environment (Ubuntu 20.04 LTS)
WSL2 + Ubuntu 20.04 Install Vivado in LTS environment
I installed Docker on my Raspberry Pi 3
Use docker in proxy environment on ubuntu 20.04.1
[Ruby] Building a Ruby development environment on Ubuntu
Build a Java development environment on Mac
Build Java 8 development environment on AWS Cloud9
Build Redmine code reading environment on Docker
Install CentOS 7 on Raspberry pi 4 Model B
Build OpenCV with Java Wrapper on Ubuntu 18.04
Build Cakephp environment from docker installation Ubuntu
Build an environment with Docker on AWS
Build a JMeter environment on your Mac
Build an Ultra96v2 development environment on Docker 1
Launched Redmine with Docker on Raspberry Pi 3
Try running ScalarDB on WSL Ubuntu (Environment Construction)
Try to build Java8 environment on Amazon Linux2
Build and install Wireshark Development Release (3.3.1) on Ubuntu
Disk expansion on Ubuntu 20.04.1 LTS on GCP Compute Engine
Install Docker on Raspberry Pi 4 and Raspberry Pi OS 64bit
Protobuf and gRPC C ++ environment construction on Ubuntu 18.04
Radiko recording server on Raspberry Pi 4 (Docker unused)
Build a DHCP and NAT router on Ubuntu 16.04
Build Apache / Tomcat development environment on Cent OS 7
Send emails using Docker container on Raspberry Pi 3