Lumina - FreeBSD 13.5 RELEASE - 環境構築


 クラウディア


1. 概要
2. インストール
3. SDDM カスタマイズ
4. シャットダウンユーザ設定
5. ユーザ用初期化ファイルの作成
6. ログインマネージャ起動

1. 概要

 下記のデスクトップ環境を構築する手順を記述します。
項 目 内  容  備考 
ホスト Windows11 Version 24H2
VitualBox Version 7.1.6
仮想タイプ BSD
仮想サブタイプ FreeBSD
仮想バージョン FreeBSD(64bit)
ゲスト FreeBSD 13.5 RELEASE
ログインマネージャ SDDM
ハードディスク 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
 バージョンの推移です。 ・2020年 6月24日 「FreeBSD 11.4 RELEASE」 「lumina-1.6.0,3」 ・2020年11月 5日 「FreeBSD 12.2 RELEASE」 「lumina-1.6.0,3」 ・2021年 5月31日 「FreeBSD 13.0 RELEASE」 「lumina-1.6.0,3」 ・2021年12月27日 「FreeBSD 12.3 RELEASE」 「lumina-1.6.0,3」 ・2022年 5月24日 「FreeBSD 13.1 RELEASE」 「lumina-1.6.2,3」 ・2022年12月 9日 「FreeBSD 12.4 RELEASE」 「lumina-1.6.2,3」 ・2023年 4月17日 「FreeBSD 13.2 RELEASE」 「lumina-1.6.2,3」 ・2024年 1月12日 「FreeBSD 14.0 RELEASE」 「lumina-1.6.2_1,3」 ・2024年 3月18日 「FreeBSD 13.3 RELEASE」 「lumina-1.6.2_1,3」 ・2024年 6月12日 「FreeBSD 14.1 RELEASE」 「lumina-1.6.2_1,3」 ・2024年10月 8日 「FreeBSD 13.4 RELEASE」 「lumina-1.6.2_1,3」 ・2025年12月11日 「FreeBSD 14.2 RELEASE」 「lumina-1.6.2_1,3」  2025年4月8日時点でのバージョンは、下記のとおりです。

$ pkg info lumina
lumina-1.6.2_1,3
Name           : lumina
Version        : 1.6.2_1,3
Installed on   : Tue Apr  8 14:44:10 2025 JST
Origin         : x11/lumina
Architecture   : FreeBSD:13:*
Prefix         : /usr/local
Categories     : x11
Licenses       : NA
Maintainer     : jwb@FreeBSD.org
WWW            : https://github.com/lumina-desktop/lumina
Comment        : Lumina Desktop Environment (meta-port)
Annotations    :
        build_timestamp: 2025-03-27T17:06:15+0000
        built_by       : poudriere-git-3.4.2-7-gf78625a5
        port_checkout_unclean: no
        port_git_hash  : dddb9bab3
        ports_top_checkout_unclean: no
        ports_top_git_hash: acebba760
        repo_type      : binary
        repository     : FreeBSD
Flat size      : 243B
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.

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 size used in the greeter
CursorSize=

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

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

# Cursor size used in the greeter
CursorSize=

# 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」ユーザ権限で。  日本語環境を有効にし、キーボードレイアウトを設定して、Num Lock を有効にします。

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 LANG             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
# set locale
#
setxkbmap -layout jp
numlockx &
EOF
exit

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

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

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

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

sysrc polkitd_enable=YES
sysrc dbus_enable=YES
sysrc sddm_enable=YES
 起動。

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


AbemaTV 無料体験
損保との違い
葬送のフリーレン Prime Video
マイニングベース