Lumina - FreeBSD 12.1 RELEASE - 環境構築

 クラウディア
1. 概要
2. パッケージインストール
3. シャットダウンユーザの設定
4. /etc/rc.conf 編集
5. ユーザ用初期化ファイルの作成
6. Lumina 起動

1. 概要

 下記のデスクトップ環境を構築する手順を記述します。
システム ホスト(Windows 10 1903 amd64)・VirtualBox 6.0.14 上のゲストとして FreeBSD 12.1 RELEASE
ログインマネージャ Slim
日本語入力 fcitx-mozc

 インストーラ入手やオペレーティングシステムのインストールあたりまでは「FreeBSD のOSインストール」を参照してください。

2. パッケージインストール


pkg install -y xorg ja-font-migmix ja-fcitx-mozc zh-fcitx-configtool
pkg install -y slim slim-themes
pkg install -y lumina

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

 一般ユーザからもシャットダウンできるようにします。  逆に、一般ユーザからシャットダウンさせないようにするにはこの手順を行わないでください。  他のデスクトップは、前のバージョンまでとは異なる設定をしないと、一般ユーザから再起動・シャットダウンできなかったのに、「Lumina」は、逆に、今までのやり方を踏襲しないと再起動・シャットダウンできないようです。  シャットダウン定義ファイルを作成して編集します。

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
 電源操作用グループを作成して、所属するグループを追加します。

pw groupadd power
vi /etc/group
 「operator」グループに、電源操作をさせるユーザを追加(この辺も、元々の他のデスクトップと違う)。

operator:*:5:root,ユーザ名
 「power」グループに「wheel」「operator」「ユーザ」を追加。  (上記の行番号は、間違いありませんが、下記の行番号は、「pw」コマンドを実行する時期によって異なりますので注意)

power:*:1002:wheel,operator,ユーザ名

4. /etc/rc.conf 編集

 前項までインストール・設定したものを有効にします。

cat - << EOF >> /etc/rc.conf

polkitd_enable="YES"
dbus_enable="YES"
slim_enable="YES"
EOF

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


/usr/share/skel/dot.xinitrc
 というファイルを作成して、編集します。

cat - << EOF >> /usr/share/skel/dot.xinitrc
#!/bin/sh
# set locale
export LC_ALL=ja_JP.UTF-8
export LANGUAGE=ja_JP.UTF-8
export LANG=ja_JP.UTF-8
#
export GTK_IM_MODULE=fcitx
export QT_IM_MODULE=xim
export XMODIFIERS=@im=fcitx
/usr/local/bin/mozc start
fcitx -r -d
#
setxkbmap -layout jp
#
exec $1
EOF
 既存ユーザは、上記をコピーします。

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

6. Lumina 起動

 上記までの設定が終わったら、デーモン群を起動します。

service dbus start
service slim start
 うまく設定できていれば、ログイン画面が表示されます(テーマを fbsd へ変更しています)。
「Lumina FreeBSD 12.1」-「ログイン画面」


 参考に、現時点(2019年12月4日)の「Lumina」のバージョンを記録しておきます。


> pkg info lumina
lumina-1.5.0,3
Name           : lumina
Version        : 1.5.0,3
Installed on   : Tue Dec  3 17:18:59 2019 JST
Origin         : x11/lumina
Architecture   : FreeBSD:12:*
Prefix         : /usr/local
Categories     : x11
Licenses       : BSD3CLAUSE
Maintainer     : jt@ixsystems.com
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/
ハイスピードプラン5G CONNECT