Fluxbox - FreeBSD 14.3 - 環境構築


クラウディア 


1. 概要
2. インストール
3. SDDM カスタマイズ
4. .desktop ファイルの作成
5. ユーザ用初期化ファイルの作成
6. ログインマネージャ起動

1. 概要

 下記のデスクトップ環境を構築する手順を記述します。
項 目 内  容  備考 
ホスト Windows11 24H2
仮想環境 VirtualBox 7.1.10
ゲスト FreeBSD 14.3 RELEASE
ログインマネージャ SDDM
仮想システムタイプ BSD
仮想サブタイプ FreeBSD
仮想システムバージョン 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 fluxbox
 最終行の、「Fluxbox」のインストールは、一瞬で終わります。  バージョンの推移です。 ・「FreeBSD 12.1 RELEASE」「FreeBSD 11.4 RELEASE」の間 「fluxbox-1.3.7_5」 ・2020年11月 9日「FreeBSD 12.2 RELEASE」 「fluxbox-1.3.7_5」 ・2021年 5月27日「FreeBSD 13.0 RELEASE」 「fluxbox-1.3.7_5」 ・2022年 1月 6日「FreeBSD 12.3 RELEASE」 「fluxbox-1.3.7_5」 ・2023年 1月 4日「FreeBSD 12.4 RELEASE」 「fluxbox-1.3.7_5」 ・2023年 5月 8日「FreeBSD 13.2 RELEASE」 「fluxbox-1.3.7_5」 ・2024年 1月10日「FreeBSD 14.0 RELEASE」 「fluxbox-1.3.7_5」 ・2024年 3月11日「FreeBSD 13.3 RELEASE」 「fluxbox-1.3.7_5」 ・2024年 6月10日「FreeBSD 14.1 RELEASE」 「fluxbox-1.3.7_8」 ・2024年10月 2日「FreeBSD 13.4 RELEASE」 「fluxbox-1.3.7_8」 ・2024年10月11日「FreeBSD 14.2 RELEASE」 「fluxbox-1.3.7_9」 ・2025年 3月21日「FreeBSD 13.5 RELEASE」 「fluxbox-1.3.7_9」  2025年6月16日の時点で、「Fluxbox」のバージョンは、下記の通りでした。

$ pkg info fluxbox
fluxbox-1.3.7_10
Name           : fluxbox
Version        : 1.3.7_10
Installed on   : Mon Jun 16 14:27:33 2025 JST
Origin         : x11-wm/fluxbox
Architecture   : FreeBSD:14:amd64
Prefix         : /usr/local
Categories     : x11-wm
Licenses       : MIT
Maintainer     : jgh@FreeBSD.org
WWW            : http://fluxbox.org/
Comment        : Small and fast window manager based on BlackBox
Options        :
        DEBUG          : off
        DOCS           : on
        IMLIB2         : on
        NLS            : on
        REMEMBER       : on
        SLIT           : on
        SYSTRAY        : on
        TOOLBAR        : on
        XINERAMA       : on
        XRENDER        : on
Shared Libs required:
        libImlib2.so.1
        libX11.so.6
        libXext.so.6
        libXft.so.2
        libXinerama.so.1
        libXpm.so.4
        libXrandr.so.2
        libXrender.so.1
        libc++.so.1
        libc.so.7
        libcxxrt.so.1
        libfontconfig.so.1
        libfreetype.so.6
        libfribidi.so.0
        libgcc_s.so.1
        libm.so.5
        librt.so.1
Annotations    :
        FreeBSD_version: 1402000
        build_timestamp: 2025-06-12T02:08:46+0000
        built_by       : poudriere-git-3.4.2-12-g74a54a88
        port_checkout_unclean: no
        port_git_hash  : 359bbf7fc
        ports_top_checkout_unclean: no
        ports_top_git_hash: 54dece1aa
        repo_type      : binary
        repository     : FreeBSD
Flat size      : 2.75MiB
Description    :
Fluxbox is a window manager based on BlackBox with some new features:

 - Transparent menus
 - Pixmap themes
 - Window snapping
 - Integrated bbkeys
 - Iconbar
 - Configurable titlebar (slit)
 - Windows tabs
 - Wheel scroll changes workspace
 - KDE and partial Gnome support

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. .desktop ファイルの作成

 ログイン時に有効となるよう、「.desktop」ファイルを作成します。  「root」ユーザ権限で。

mkdir -pv /usr/local/share/xsessions

sh
cat << 'EOF' >> /usr/local/share/xsessions/fluxbox.desktop
[Desktop Entry]
Name=Fluxbox
Comment=A lightweight window manager for the X Windowing System
Exec=fluxbox
Terminal=false
TryExec=fluxbox
Type=Application
EOF
exit

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
exec fluxbox
EOF
chmod +x /usr/share/skel/dot.xsession
exit
 既存のログインユーザで。

cp /usr/share/skel/dot.xsession ~/.xsession

6. ログインマネージャ起動

 前項までインストール・設定したものを有効にします。  「root」ユーザ権限で。

sysrc dbus_enable=YES
sysrc sddm_enable=YES
 起動。

service dbus start
service sddm start
 うまく設定できていれば、ログイン画面が表示されます。  ユーザ名・パスワードを入力してログインします。

 「FreeBSD 13.5 RELEASE」の途中から「sddm」の起動時に、下記のメッセージが出て、「sddm-freebsd-black-theme」が効かなくなっています。


[14:31:57.767] (II) DAEMON: Loading theme configuration from "/usr/local/share/sddm/themes/sddm-freebsd-black-theme/theme.conf"
[14:31:57.767] (WW) DAEMON: The theme at "/usr/local/share/sddm/themes/sddm-freebsd-black-theme" requires missing "/usr/local/bin/sddm-greeter" . Using fallback theme.

AbemaTV 無料体験
U-NEXT
【usus ウズウズ】
JETBOY