2. インストール
「root」ユーザで
pkg install -y xorg ja-font-migmix
pkg install -y sddm sddm-freebsd-black-theme hal cursor-neutral-white-theme
pkg install -y icewm
3. SDDM カスタマイズ
ログイン画面の解像度を「1366x768」とし、キーボードレイアウトを「jp.106」にします。
「root」ユーザで
cat << EOF >> /usr/local/share/sddm/scripts/Xsetup
xrandr -s 1366x768
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」ユーザで
mkdir -pv /usr/local/share/xsessions
cat - << EOF >> /usr/local/share/xsessions/icewm-session.desktop
[Desktop Entry]
Encoding=UTF-8
Type=XSession
Name=IceWM Session
GenericName=Window Manager
Comment=This session logs you into IceWM
Comment[ja]=IceWM セッションにログインします
Icon=icewm
TryExec=/usr/local/bin/icewm-session
Exec=icewm-session
NoDisplay=false
Hidden=false
Categories=WindowManager;Application;System;
StartupNotify=false
X-GNOME-Autostart-Notify=false
X-GNOME-Autostart-Phase=WindowManager
X-GNOME-Provides=windowmanager
X-GNOME-WMName=icewm
DesktopNames=ICEWM
X-LightDM-DesktopName=icewm
[Window Manager]
Name=icewm
SessionManaged=true
StartupNotification=false
EOF
5. ユーザ用初期化ファイルの作成
「root」ユーザで
cat - << EOF >> /usr/share/skel/dot.xsession
#!/bin/sh
# set locale
export LC_ALL=ja_JP.UTF-8
export LANGUAGE=ja_JP.UTF-8
export LANG=ja_JP.UTF-8
#
setxkbmap -layout jp
EOF
chmod +x /usr/share/skel/dot.xsession
既存のログインユーザで
cp /usr/share/skel/dot.xsession ~/.xsession
「VBoxClient」の起動スクリプトを作製します。
これは、今んとこ、各ログインユーザで
mkdir -pv ~/.icewm
cat - << EOF >> ~/.icewm/startup
#!/bin/sh
/usr/local/bin/VBoxClient-all
EOF
chmod +x ~/.icewm/startup
6. /etc/rc.conf 編集
前項までインストール・設定したものを有効にします。
cat - << EOF >> /etc/rc.conf
polkitd_enable="YES"
dbus_enable="YES"
hald_enable="YES"
sddm_enable="YES"
EOF
7. ログインマネージャ起動
「root」ユーザで
service dbus start
service hald start
service sddm start
うまく設定できていれば、ログイン画面が表示されます。
ユーザ名・パスワードを入力してログインします。
2020年6月19日の時点で、「IceWM」のバージョンは、下記の通りでした。
$ pkg info icewm
icewm-1.3.8_5
Name : icewm
Version : 1.3.8_5
Installed on : Fri Jun 19 08:21:15 2020 JST
Origin : x11-wm/icewm
Architecture : FreeBSD:11:amd64
Prefix : /usr/local
Categories : x11-wm
Licenses : LGPL20
Maintainer : portmaster@bsdforge.com
WWW : http://www.icewm.org/
Comment : Window Manager designed for speed, usability and consistency
Options :
BEASTIE : on
DOCS : on
GNOME : off
LITE : off
MENUFIX : on
NLS : on
XFT : on
XINERAMA : on
XRANDR : on
Shared Libs required:
libglib-2.0.so.0
libgdk_pixbuf_xlib-2.0.so.0
libgobject-2.0.so.0
libXrender.so.1
libfreetype.so.6
libXext.so.6
libICE.so.6
libXft.so.2
libintl.so.8
libSM.so.6
libXrandr.so.2
libiconv.so.2
libfontconfig.so.1
libgdk_pixbuf-2.0.so.0
libXinerama.so.1
libX11.so.6
Annotations :
FreeBSD_version: 1103000
repo_type : binary
repository : FreeBSD
Flat size : 2.89MiB
Description :
Window Manager designed for speed, usability and consistency.
'bsd-daemon.xpm' is from Steve Farrell.
WWW: http://www.icewm.org/