ここまでの時点で、システムインストールと「VirtualBox Guest Additions」の設定は終わっているものとします。
ぞれぞれのインストール・設定に関しては、
「FreeBSD - デスクトップ環境構築 - 共通事項 - システムインストール」
「FreeBSD - デスクトップ環境構築 - 共通事項 - VirtualBox Guest Additions」
をご参照ください。
2. インストール
「root」ユーザで
pkg install -y xorg ja-font-migmix
pkg install -y sddm sddm-freebsd-black-theme cursor-neutral-white-theme
pkg install -y icewm
2020年11月 2日の時点で、バージョンは「icewm-1.8.3_1」でした。
2021年 4月23日の時点で、バージョンは「icewm-2.3.1」でした。
2021年12月24日の時点で、バージョンは「icewm-2.7.0」でした。
2023年1月6日の時点で、「IceWM」のバージョンは、下記の通りでした。
頻繁にメンテナンスされているようです。
老舗にはいる部類であるかと思うのに、すごいです。
$ pkg info icewm
icewm-2.9.9
Name : icewm
Version : 2.9.9
Installed on : Fri Jan 6 11:19:50 2023 JST
Origin : x11-wm/icewm
Architecture : FreeBSD:12:amd64
Prefix : /usr/local
Categories : x11-wm
Licenses : LGPL20
Maintainer : portmaster@bsdforge.com
WWW : https://ice-wm.org/
Comment : Window manager designed for speed and usability
Options :
BEASTIE : on
DOCS : on
IMLIB2 : on
NLS : on
SVG : off
XFT : on
XINERAMA : on
XRANDR : on
Shared Libs required:
libsndfile.so.1
libintl.so.8
libiconv.so.2
libgobject-2.0.so.0
libglib-2.0.so.0
libgio-2.0.so.0
libfribidi.so.0
libfreetype.so.6
libfontconfig.so.1
libXrender.so.1
libXrandr.so.2
libXpm.so.4
libXinerama.so.1
libXft.so.2
libXfixes.so.3
libXext.so.6
libXdamage.so.1
libXcomposite.so.1
libX11.so.6
libSM.so.6
libImlib2.so.1
libICE.so.6
Annotations :
FreeBSD_version: 1203000
repo_type : binary
repository : FreeBSD
Flat size : 5.49MiB
Description :
IceWM is a window manager for the X Window System. The goal of IceWM
is speed, simplicity, and not getting in the user's way. It comes with
a taskbar with pager, global and per-window keybindings, a dynamic menu
system, a simple session manager, and a system tray. It is standards
compliant, very configurable, themeable, and well documented.
WWW: https://ice-wm.org/
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 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. セッションファイル作成
インストール時点で、実は「.desktop」ファイルが作成されています。
/usr/local/share/xsessions/icewm-session.desktop
/usr/local/share/xsessions/icewm.desktop
「FreeBSD 13.1 RELEASE」「icewm 2.9.6」のときは、パスを間違えていたのでログインできませんでしたが、現在は修正されていますので、そのまま使用できます。
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 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.xsession
#!/bin/sh
#
/usr/local/bin/VBoxClient-all
#
setxkbmap -layout jp
numlockx on
EOF
chmod +x /usr/share/skel/dot.xsession
exit
既存のログインユーザで
cp /usr/share/skel/dot.xsession ~/.xsession
6. /etc/rc.conf 編集
「root」ユーザ権限で。
前項までインストール・設定したものを有効にします。
sysrc dbus_enable=YES
sysrc sddm_enable=YES
起動します。
service dbus start
service sddm start
うまく設定できていれば、ログイン画面が表示されます。
「IceWM」と「IceWM Session」があります。
「IceWM Session」の方が、壁紙の面倒までみてくれますので、わたしは「IceWM Session」の方でログインすることにしています。
ユーザ名・パスワードを入力してログインします。