ここまでの時点で、システムインストールと「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 enlightenment
バージョンの推移です。
・2020年11月 2日 「0.24.2,2」
・2022年12月 9日 「FreeBSD 12.4 RELEASE」 「0.25.4,2」
・2023年 4月17日 「FreeBSD 13.2 RELEASE」 「0.25.4,2」
・2023年12月19日 「FreeBSD 14.0 RELEASE」 「0.25.4_2,2」(インストール失敗)
・2024年 2月 1日 「FreeBSD 14.0 RELEASE」 「0.26.0,2」
2024年3月13日、インストール時は、下記のバージョンでした。
$ pkg info enlightenment
enlightenment-0.26.0,2
Name : enlightenment
Version : 0.26.0,2
Installed on : Wed Mar 13 12:49:27 2024 JST
Origin : x11-wm/enlightenment
Architecture : FreeBSD:13:amd64
Prefix : /usr/local
Categories : x11-wm enlightenment
Licenses : BSD2CLAUSE
Maintainer : enlightenment@FreeBSD.org
WWW : https://www.enlightenment.org/
Comment : Artistic and fast X window manager
Options :
EXIF : on
NLS : on
Shared Libs required:
libpulse.so.0
libintl.so.8
libexif.so.12
libevas.so.1
libeo.so.1
libemotion.so.1
libelementary.so.1
libeldbus.so.1
libeio.so.1
libeina.so.1
libefreet.so.1
libeet.so.1
libedje.so.1
libecore_x.so.1
libecore_ipc.so.1
libecore_input_evas.so.1
libecore_input.so.1
libecore_file.so.1
libecore_evas.so.1
libecore_con.so.1
libecore_audio.so.1
libecore.so.1
Annotations :
FreeBSD_version: 1302001
build_timestamp: 2024-03-10T11:35:48+0000
built_by : poudriere-git-3.4.1-1-g1e9f97d6
cpe : cpe:2.3:a:enlightenment:enlightenment:0.26.0:::::freebsd13:x64
port_checkout_unclean: no
port_git_hash : 756e18783
ports_top_checkout_unclean: no
ports_top_git_hash: c03c94943
repo_type : binary
repository : FreeBSD
Flat size : 402MiB
Description :
A very artistic and fast X window manager.
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 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. ユーザからのシャットダウン・再起動を有効化する
インストール時のメッセージで表示されるのですが・・・。
「enlightenment」でデスクトップ環境下のユーザからのシャットダウン・再起動を有効にするには「enlightenment_sys」の権限を設定しなければなりません。
「root」ユーザ権限で。
chmod 4555 /usr/local/lib/enlightenment/utils/enlightenment_sys
逆に、一般ユーザからシャットダウンさせないようにするにはこの手順を行わないでください。
5. ユーザ用初期化ファイルの作成
「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 LANG ja_JP.UTF-8
setenv LANGUAGE ja_JP.UTF-8
setenv LANG ja_JP.UTF-8
EOF
exit
キーボードレイアウトを設定して、Num Lock を有効にします。
sh
cat << 'EOF' >> /usr/share/skel/dot.xsession
#!/bin/sh
#
setxkbmap -layout jp
/usr/local/bin/VBoxClient-all
numlockx &
EOF
exit
chmod +x /usr/share/skel/dot.xsession
ログインユーザで。
cp /usr/share/skel/dot.xsession ~/.xsession
6. /etc/rc.conf 編集
前項までインストール・設定したものを有効にします。
「root」ユーザ権限で。
sysrc polkitd_enable=YES
sysrc dbus_enable=YES
sysrc sddm_enable=YES
7. ログインマネージャ起動
「root」ユーザ権限で。
service dbus start
service sddm start
うまく設定できていれば、ログイン画面が表示されます。
ユーザ名・パスワードを入力してログインします。