Lumina - FreeBSD 13.1 RELEASE - 環境構築

 クラウディア
1. 概要
2. インストール
3. SDDM カスタマイズ
4. シャットダウンユーザ設定
5. ユーザ用初期化ファイルの作成
6. /etc/rc.conf 編集
7. ログインマネージャ起動

1. 概要

 下記のデスクトップ環境を構築する手順を記述します。
 種別   リソース・設定   備考 
ホスト Windows10 21H2
仮想環境 VirtualBox 6.1.34
ゲスト FreeBSD 13.1 RELEASE
ログインマネージャ SDDM
仮想システムタイプ BSD
仮想システムバージョン FreeBSD (64bit)
ハードディスク 180 GB
メモリ 4 GB
CPU 2コア
グラフィックスコントローラ VBoxSVGA 128MB 3D Disable

 ここまでの時点で、システムインストールと「VirtualBox Guest Additions」の設定は終わっているものとします。
 ぞれぞれのインストール・設定に関しては、

	「FreeBSD - デスクトップ環境構築 - 共通事項 - システムインストール」
	「FreeBSD - デスクトップ環境構築 - 共通事項 - VirtualBox Guest Additions」

 をご参照ください。

2. インストール

 「root」ユーザ権限で。

pkg install -y xorg ja-font-migmix numlockx
pkg install -y sddm sddm-freebsd-black-theme cursor-neutral-white-theme
pkg install -y lumina
 2021年5月31日、2020年11月5日、2021年12月27日時点の「Lumina」のバージョンは、「lumina-1.6.0,3」でした。  2022年5月24日時点の「Lumina」のバージョンは、下記の通りでした。  久々に、微妙にあがっております。

$ pkg info lumina
lumina-1.6.2,3
Name           : lumina
Version        : 1.6.2,3
Installed on   : Tue May 24 19:32:07 2022 JST
Origin         : x11/lumina
Architecture   : FreeBSD:13:*
Prefix         : /usr/local
Categories     : x11
Licenses       : BSD3CLAUSE
Maintainer     : lbartoletti@FreeBSD.org
WWW            : https://lumina-desktop.org/
Comment        : Lumina Desktop Environment (meta-port)
Annotations    :
        repo_type      : binary
        repository     : FreeBSD
Flat size      : 378B
Description    :
The Lumina Desktop Environment is a lightweight system interface that is
designed for use on any Unix-like operating system. It takes a
plugin-based approach, allowing the entire interface to be assembled or
arranged by each individual user as desired, with a system-wide default
layout which can be customized by the system administrator. This allows
every system (or user session) to be designed to maximize the individual
user's productivity.

This meta-package installs all the packages related to the Lumina desktop.
If you want more fine-grained control over the installed utilities, please
install the individual x11/lumina-* and deskutils/lumina-* packages instead.

WWW: https://lumina-desktop.org/

3. SDDM カスタマイズ

 ログイン画面の解像度を「1366x768」とし、キーボードレイアウトを「jp.106」にします。  「root」ユーザで

cat << EOF >>  /usr/local/share/sddm/scripts/Xsetup

xrandr --output VGA-0 --mode 1366x768 --rate 60
setxkbmap -layout jp
EOF
 「xrandr」の設定値は、ハードウェア構成によって異なりますので、ご注意ください。  適切に設定しないと、デスクトップ上の文字が、異常に大きくなったりします。  ログイン画面のテーマとカーソルを変更します。  「root」ユーザのまま。

sddm --example-config > /usr/local/etc/sddm.conf
vi /usr/local/etc/sddm.conf

[Theme]
# Current theme name
Current=breeze

# Cursor theme used in the greeter
CursorTheme=breeze_cursors
 を下記へ変更します。

[Theme]
# Current theme name
Current=sddm-freebsd-black-theme

# Cursor theme used in the greeter
CursorTheme=Neutral++_White

4. シャットダウンユーザの設定

 一般ユーザからもシャットダウンできるようにします。  逆に、一般ユーザからシャットダウンさせないようにするにはこの手順を行わないでください。  「Lumina」の設定は、以前やっていたものと同様の方法でいけます。  以下、「root」ユーザ権限で。  「polkit」の設定。

sh
cat << 'EOF' >> /usr/local/etc/polkit-1/localauthority/50-local.d/org.freedesktop.consolekit.pkla
[Local restart]
Idendity=unix-group:power
Action=org.freedesktop.consolekit.system.restart
ResultAny=yes
ResultInactive=yes
ResultActive=yes

[Local shutdown]
Idendity=unix-group:power
Action=org.freedesktop.consolekit.system.stop
ResultAny=yes
ResultInactive=yes
ResultActive=yes

[Local restart - multiple]
Idendity=unix-group:power
Action=org.freedesktop.consolekit.system.restart-multiple-users
ResultAny=yes
ResultInactive=yes
ResultActive=yes

[Local shutdown - multiple]
Idendity=unix-group:power
Action=org.freedesktop.consolekit.system.stop-multiple-users
ResultAny=yes
ResultInactive=yes
ResultActive=yes

[Suspend Hibernate]
Idendity=unix-group:power
Action=org.freedesktop.upower.*
ResultAny=yes
ResultInactive=yes
ResultActive=yes
EOF
exit
 電源操作グループ作成

pw groupadd power
 「/etc/group」編集

vi /etc/group

power:*:1002:wheel,operator,power	←	1002 はタイミングによって変わります。: 以降を追加しています。
 「operator」に「Lumina」でログインするユーザのグループを追加します。

operator:*:5:root	←	スペースを空けず、カンマで区切って権限を与えるユーザのグループを追加

5. ユーザ用初期化ファイルの作成

 「root」ユーザ権限で。

sh
cat << 'EOF' >> /etc/profile
export LC_ALL="ja_JP.UTF-8"
export LANGUAGE="ja_JP.UTF-8"
export LANG="ja_JP.UTF-8"
EOF

cat << 'EOF' >> /etc/csh.cshrc
setenv LC_ALL   "ja_JP.UTF-8"
setenv LANGUAGE "ja_JP.UTF-8"
setenv LANG     "ja_JP.UTF-8"
EOF

cat << 'EOF' >> /usr/share/skel/dot.xsession
#!/bin/sh
#
setxkbmap -layout jp
numlockx on
EOF
exit

chmod +x /usr/share/skel/dot.xsession
 既存のログインユーザで

cp /usr/share/skel/dot.xsession ~/.xsession

6. /etc/rc.conf 編集

 前項までインストール・設定したものを有効にします。  「root」ユーザ権限で。

sysrc polkitd_enable=YES
sysrc dbus_enable=YES
sysrc sddm_enable=YES

7. ログインマネージャ起動

 「root」ユーザ権限で。

service dbus start
service sddm start
 うまく設定できていれば、ログイン画面が表示されます。  ユーザ名・パスワードを入力してログインします。
「Lumina FreeBSD 13.1」-「ログイン画面」

ハイスピードプランネットオークションの相場、統計、価格比較といえばオークファン【usus ウズウズ】マイニングベース