ここまでの時点で、システムインストールと「VirtualBox Guest Additions」の設定は終わっているものとします。
それぞれのインストール・設定に関しては、
「FreeBSD - デスクトップ環境構築 - 共通事項 - システムインストール」
「FreeBSD - デスクトップ環境構築 - 共通事項 - VirtualBox Guest Additions」
をご参照ください。
2. インストール
「root」ユーザで
pkg install -y xorg numlockx ja-font-migmix
pkg install -y sddm sddm-freebsd-black-theme cursor-neutral-white-theme
pkg install -y awesome
2022年5月21日の時点で、「awesome」のバージョンは、下記の通りでした。
$ pkg info awesome
awesome-4.3_1,1
Name : awesome
Version : 4.3_1,1
Installed on : Sat May 21 13:43:32 2022 JST
Origin : x11-wm/awesome
Architecture : FreeBSD:13:amd64
Prefix : /usr/local
Categories : x11-wm
Licenses : GPLv2+
Maintainer : dbaio@FreeBSD.org
WWW : https://awesomewm.org/
Comment : Highly configurable, next generation framework window manager
Options :
DBUS : on
DOCS : on
MANPAGES : on
Shared Libs required:
libxcb-cursor.so.0
libglib-2.0.so.0
libgobject-2.0.so.0
libgdk_pixbuf-2.0.so.0
libxcb-shape.so.0
libxcb-xinerama.so.0
libxdg-basedir.so.1
libstartup-notification-1.so.0
libdbus-1.so.3
liblua-5.2.so
libxkbcommon-x11.so.0
libcairo.so.2
libxcb-util.so.1
libintl.so.8
libxcb-xrm.so.0
libxkbcommon.so.0
libxcb-icccm.so.4
libxcb-xkb.so.1
libxcb-randr.so.0
libxcb.so.1
libxcb-render.so.0
libxcb-xtest.so.0
libxcb-keysyms.so.1
libX11.so.6
Annotations :
FreeBSD_version: 1300139
repo_type : binary
repository : FreeBSD
Flat size : 2.20MiB
Description :
awesome is a highly configurable, next generation framework window
manager for X. It is very fast, small, dynamic, heavily extensible using
the Lua programming language, and licensed under the GNU GPLv2 license.
It is primarly targeted at power users, developers and any people
dealing with every day computing tasks and who want to have fine-grained
control on theirs graphical environment.
「FreeBSD 12.1 RELEASE」のときと2020年6月26日に「FreeBSD 11.4 RELEASE」へインストールしたとき、2020年11月11日に「FreeBSD 12.2 RELEASE」へインストールしたときと変わりはありません。
「FreeBSD 13.0 RELEASE」へインストールしたとき(2021年6月18日)も同様です。
「FreeBSD 12.3 RELEASE」へインストールしたとき(2022年12月22日)も同様です。
ずいぶん、メンテナンスされていないようです。
3. SDDM カスタマイズ
ログイン画面の解像度を「1366x768」とし、キーボードレイアウトを「jp.106」にします。
「root」ユーザ権限で。
cat << EOF >> /usr/local/share/sddm/scripts/Xsetup
xrandr --output VGA-0 --mode 1366x768 --rate 60
setxkbmap -layout jp
EOF
ログイン画面のテーマとカーソルを変更します。
「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
exit
sh
cat << 'EOF' >> /usr/share/skel/dot.xsession
#!/bin/sh
#
setxkbmap -layout jp
numlockx &
EOF
exit
chmod +x /usr/share/skel/dot.xsession
既存のログインユーザで
cp /usr/share/skel/dot.xsession ~/.xsession
5. /etc/rc.conf 編集
前項までインストール・設定したものを有効にします。
「root」ユーザ権限で。
sysrc polkitd_enable=YES
sysrc dbus_enable=YES
sysrc sddm_enable=YES
6. ログインマネージャ起動
「root」ユーザで
service dbus start
service sddm start
うまく設定できていれば、ログイン画面が表示されます。
ユーザ名・パスワードを入力してログインします。