JWM - FreeBSD 14.2 - 環境構築

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

1. 概要

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

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

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

 をご参照ください。

2. インストール


pkg install -y xorg numlockx ja-font-migmix
pkg install -y sddm sddm-freebsd-black-theme cursor-neutral-white-theme

pkg install -y jwm
 最終行の、「JWM」のインストールは、一瞬で終わります。  バージョンの推移です。 ・2020年11月10日 「FreeBSD 12.2 RELEASE」 「2.3.7」 ・2020年 6月26日 「FreeBSD 12.1 RELEASE」 「2.3.7」 ・2021年 6月 8日 「FreeBSD 13.0 RELEASE」 「2.3.7_1」 ・2022年 1月18日 「FreeBSD 13.0 RELEASE」 「2.3.7_1」 ・2023年 1月10日 「FreeBSD 12.4 RELEASE」 「2.4.2_1」 ・2023年 5月19日 「FreeBSD 13.2 RELEASE」 「2.4.3」 ・2024年 1月29日 「FreeBSD 14.0 RELEASE」 「2.4.3」 ・2024年 3月22日 「FreeBSD 13.3 RELEASE」 「2.4.3」 ・2024年 6月14日 「FreeBSD 14.1 RELEASE」 「2.4.3」 ・2024年10月15日 「FreeBSD 13.4 RELEASE」 「2.4.3」  2024年12月16日の時点で、下記のバージョンでした。

$ jwm -v
JWM v2.4.3 by Joe Wingbermuehle
compiled options: confirm icons jpeg nls pango png shape xbm xft xinerama xpm xrender
system configuration: /usr/local/etc/system.jwmrc

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 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. 初期化ファイルの作成

 「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.xinitrc
#!/bin/sh
#
/usr/local/bin/VBoxClient-all
#
setxkbmap -layout jp
numlockx on
export DESKTOP=jwm
exec jwm
EOF
chmod +x /usr/share/skel/dot.xinitrc
exit
 既存のログインユーザで

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

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

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

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

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

AbemaTV 無料体験