PekWM - FreeBSD 13.5 - 環境構築


クラウディア 


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

1. 概要

 下記のデスクトップ環境を構築する手順を記述します。
種  別 リソース・設定  備考 
ホスト Windows11 24H2
仮想環境 VirtualBox 7.1.8
ゲスト FreeBSD 13.5 RELEASE
ログインマネージャ SDDM
仮想システムタイプ BSD
仮想サブシステムタイプ FreeBSD
仮想システムバージョン FreeBSD (64bit)
ハードディスク 160 GB
メモリ 4 GB
CPU 2コア
グラフィックスコントローラ VBoxSVGA 256MB 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 consolekit2 polkit

pkg install -y pekwm
 最終行の、「PekWM」のインストールは、数秒で終わります。  バージョンの推移です。 ・2023年 2月10日 「FreeBSD 12.4 RELEASE」 「0.2.0,1」 ・2023年 5月22日 「FreeBSD 13.2 RELEASE」 「0.3.0,1」 ・2024年 1月31日 「FreeBSD 14.0 RELEASE」 「0.3.0_1,1」 ・2024年 3月28日 「FreeBSD 13.3 RELEASE」 「0.3.0_1,1」 ・2024年 6月18日 「FreeBSD 14.1 RELEASE」 「0.3.0_2,1」 ・2024年10月21日 「FreeBSD 13.4 RELEASE」 「0.3.0_2,1」 ・2024年12月19日 「FreeBSD 14.2 RELEASE」 「0.3.0_2,1」  2025年5月15日の時点で、バージョンは、下記の通りでした。

$ pkg info pekwm
pekwm-0.3.0_2,1
Name           : pekwm
Version        : 0.3.0_2,1
Installed on   : Thu May 15 18:08:28 2025 JST
Origin         : x11-wm/pekwm
Architecture   : FreeBSD:13:amd64
Prefix         : /usr/local
Categories     : x11-wm
Licenses       : GPLv2
Maintainer     : natbsd@instinctive.eu
WWW            : https://www.pekwm.se/
Comment        : Light, Unobtrusive, and configurable windowmanager
Options        :
        PANGO          : on
Shared Libs required:
        libICE.so.6
        libSM.so.6
        libX11.so.6
        libXext.so.6
        libXft.so.2
        libXinerama.so.1
        libXpm.so.4
        libXrandr.so.2
        libc++.so.1
        libc.so.7
        libcairo.so.2
        libcxxrt.so.1
        libfontconfig.so.1
        libfreetype.so.6
        libgcc_s.so.1
        libglib-2.0.so.0
        libgobject-2.0.so.0
        libharfbuzz.so.0
        libintl.so.8
        libjpeg.so.8
        libm.so.5
        libpango-1.0.so.0
        libpangocairo-1.0.so.0
        libpangoft2-1.0.so.0
        libpangoxft-1.0.so.0
        libpng16.so.16
Annotations    :
        FreeBSD_version: 1304000
        build_timestamp: 2025-04-15T20:56:50+0000
        built_by       : poudriere-git-3.4.2-9-g05a460dc
        port_checkout_unclean: no
        port_git_hash  : 359bbf7fc
        ports_top_checkout_unclean: no
        ports_top_git_hash: 37270c265
        repo_type      : binary
        repository     : FreeBSD
Flat size      : 2.80MiB
Description    :
The Pek Window Manager is written by Claes Nasten, the code is based
on the aewm++ window manager, but it has evolved enough that it no
longer resembles aewm++ at all.
It has a much expanded feature-set, including window grouping (similar
to ion, pwm, or fluxbox), autoproperties, xinerama, keygrabber that
supports keychains, and much more.

o Lightweight and Unobtrusive, a window manager shouldn't be noticed.
o Very configurable, we all work and think in different ways.
o Automatic properties, for all the lazy people, make things appear as
  they should when starting applications.
o Chainable Keygrabber, usability for everyone.

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=PekWM
exec pekwm
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
 うまく設定できていれば、ログイン画面が表示されます。  ユーザ名・パスワードを入力してログインします。

 「sddm-freebsd-black-theme」を設定したはずなのに、違うログイン画面でびっくりします。
 どうも「284986 – deskutils/plasma6-sddm-kcm: SDDM themes are no longer effective」を読むと。
 「sddm-freebsd-black-theme」は、「/usr/local/bin/sddm-greeter」を必要とするのですが。
 「/usr/local/bin/sddm-greeter」は、なくなって「/usr/local/bin/sddm-greeter-qt6」になっており、「/usr/local/bin/sddm-greeter-qt6」は、「sddm-freebsd-black-theme」を解釈できないようなのです。
 なので、「pkg」が対応するまでは、このログイン画面で我慢するしかなさそうです。


AbemaTV 無料体験
Amazonギフトカード
earthcar(アースカー)