leftwm - FreeBSD 12.4 RELEASE - 環境構築

クラウディア 
1. 概要
2. インストール
3. SDDM カスタマイズ
4. 初期化ファイル作成
5. ログインマネージャ起動
6. 備考

1. 概要

 下記のデスクトップ環境を構築する手順を記述します。
 種別   リソース・設定   備考 
ホスト Windows10 21H2
仮想環境 VirtualBox 7.0.4
ゲスト FreeBSD 12.4 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 bash feh leftwm
 「bash」は、「OctoPkg」をインストールする際に必要ですが、「leftwm」では、環境を整えるために必要なようです。  「feh」は、デスクトップの背景(壁紙)を書くのに必要です。  備考に末尾のインストール実行時のメッセージとバージョン情報を記録しておきます。

3. SDDM カスタマイズ

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

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

xrandr --output VGA-0 --mode 1366x768 --rate 60
setxkbmap -layout jp
EOF
exit
 ログイン画面のテーマとカーソルを変更します。  「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. 初期化ファイル作成

 「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
/usr/local/bin/VBoxClient-all
EOF
exit

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

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

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

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

sysrc polkitd_enable=YES
sysrc dbus_enable=YES
sysrc sddm_enable=YES
 起動します。

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

6. 備考

 2022年4月18日時点で、「FreeBSD 13.0 RELEASE」へインストールしたときのバージョンが、「0.2.11.19_3」でした。  2022年6月1日の時点で、「FreeBSD 13.0 RELEASE」へインストールしたときのバージョンが、「0.2.11.19_3」と変わらずでした。  2023年1月11日の時点で、「FreeBSD 12.4 RELEASE」へインストールしたときのバージョンが、下記のとおり「0.3.0_4」とリビジョンが少し、あがっています。

$ pkg info leftwm
leftwm-0.3.0_4
Name           : leftwm
Version        : 0.3.0_4
Installed on   : Wed Jan 11 14:06:58 2023 JST
Origin         : x11-wm/leftwm
Architecture   : FreeBSD:12:amd64
Prefix         : /usr/local
Categories     : x11-wm
Licenses       : MIT
Maintainer     : rigoletto@FreeBSD.org
WWW            : https://leftwm.org/
Comment        : Tiling window manager for Adventurers
Options        :
        DOCS           : on
        THEMES         : on
Annotations    :
        FreeBSD_version: 1203000
        repo_type      : binary
        repository     : FreeBSD
Flat size      : 16.5MiB
Description    :
LeftWM is a tiling window manager written in Rust that aims to be stable
and performant. LeftWM is designed to do one thing and to do that one thing
well: be a window manager. LeftWM therefore follows the following mantra:

- LeftWM is not a compositor.
- LeftWM is not a lock screen.
- LeftWM is not a bar. But, there are lots of good bars out there. With
         themes, picking one is as simple as setting a symlink.

WWW: https://leftwm.org/
earthcar(アースカー)