Raspbian Lite は CUI 用の OS イメージ。
でもちょっと X 上の動作確認がしたくて追加インストール
環境
- 2020-05-27-raspios-buster-lite-armhf
- RaspberryPi Model B+
何も考えずに失敗
何も考えずに
$ sudo apt install xorg
してみた。
$ startx
としても画面の操作ができない。ウィンドウマネージャが入ってないので当たり前か。
更に何も考えずに
$ sudo apt install mate
して
$ startx
すると起動したが、重たい・・・ほとんど使えなかった。やり直し。
先に raspi-config してみる
$ sudo raspi-config
して、
3 Boot Options Configure options for start-up
から進めて
B4 Desktop Autologin Desktop GUI, automatically logged in as 'pi' user
を選ぶと
Do 'sudo apt-get install lightdm' to allow configuration of boot to desktop ```
と出てきた。なので
$ sudo apt-get install lightdm
としてから再起動。そうすると GUI のログオン画面が出てくるが、ここで pi ユーザーでログオンしようとしてもダメだった。
raspberrypi-ui-mods
$ sudo apt install raspberrypi-ui-mods
Reading package lists... Done
Building dependency tree
Reading state information... Done
The following additional packages will be installed:
adwaita-icon-theme agnostics aspell aspell-en at-spi2-core bluealsa bubblewrap dbus dbus-user-session dconf-gsettings-backend dconf-service desktop-base
.
.
.
2 upgraded, 502 newly installed, 0 to remove and 38 not upgraded.
Need to get 246 MB of archives.
After this operation, 1182 MB of additional disk space will be used.
となる。
この後先のように raspi-config して、再起動すると X が使えるようになった。