- 1. 概要
- 2. インストール
- 3. SDDM カスタマイズ
- 4. 初期化ファイルの作成
- 5. ログインマネージャ起動
1. 概要
下記のデスクトップ環境を構築する手順を記述します。
種別 | リソース・設定 | 備考 |
ホスト | Windows11 23H2 | |
仮想環境 | VirtualBox 7.0.14 | |
ゲスト | FreeBSD 14.0 RELEASE | |
ログインマネージャ | SDDM | |
仮想システムタイプ | BSD | |
仮想システムバージョン | 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 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日の時点で、バージョンは、下記の通りでした。
$ pkg info pekwm
pekwm-0.3.0_1,1
Name : pekwm
Version : 0.3.0_1,1
Installed on : Wed Jan 31 08:30:01 2024 JST
Origin : x11-wm/pekwm
Architecture : FreeBSD:14: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:
libpng16.so.16
libpangoxft-1.0.so.0
libpangoft2-1.0.so.0
libpangocairo-1.0.so.0
libpango-1.0.so.0
libjpeg.so.8
libintl.so.8
libharfbuzz.so.0
libgobject-2.0.so.0
libglib-2.0.so.0
libfreetype.so.6
libfontconfig.so.1
libcairo.so.2
libXrandr.so.2
libXpm.so.4
libXinerama.so.1
libXft.so.2
libXext.so.6
libX11.so.6
libSM.so.6
libICE.so.6
Annotations :
FreeBSD_version: 1400097
build_timestamp: 2024-01-12T15:36:37+0000
built_by : poudriere-git-3.4.0
port_checkout_unclean: no
port_git_hash : 756e18783
ports_top_checkout_unclean: no
ports_top_git_hash: 756e18783
repo_type : binary
repository : FreeBSD
Flat size : 2.86MiB
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
うまく設定できていれば、ログイン画面が表示されます。
ユーザ名・パスワードを入力してログインします。

|