dwm - FreeBSD 13.0 RELEASE - 環境構築

クラウディア 
1. 概要
2. インストール
3. SDDM カスタマイズ
4. ユーザ用初期化ファイルの作成
5. /etc/rc.conf 編集
6. ログインマネージャ起動

1. 概要

 下記のデスクトップ環境を構築する手順を記述します。
 項目   内容   備考 
ホスト Windows10 Version 20H2
VitualBox Version 6.1.22
ゲスト FreeBSD 13.0 RELEASE
ログインマネージャ SDDM

 ここまでの時点で、システムインストールと「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 dwm
 2021年6月28日の時点で、「dwm」のバージョンは、下記の通りでした。

$ pkg info dwm
dwm-6.2_2
Name           : dwm
Version        : 6.2_2
Installed on   : Mon Jun 28 09:58:23 2021 JST
Origin         : x11-wm/dwm
Architecture   : FreeBSD:13:amd64
Prefix         : /usr/local
Categories     : x11-wm
Licenses       : MIT
Maintainer     : 0mp@FreeBSD.org
WWW            : https://dwm.suckless.org/
Comment        : Dynamic, small, fast and simple window manager
Options        :
        DMENUANDSTERM  : on
        DOCS           : on
        SUPERASMODKEY  : off
        VOLUMECONTROL  : off
        XINERAMA       : on
Shared Libs required:
        libX11.so.6
        libXinerama.so.1
        libXft.so.2
        libfontconfig.so.1
Annotations    :
        FreeBSD_version: 1300139
        repo_type      : binary
        repository     : FreeBSD
Flat size      : 52.0KiB
Description    :
dwm is a minimalistic window manager. It manages windows in tiling and floating
modes, much like ion, larswm and wmii. dwm however is much smaller, faster and
simpler.

It consists of a single binary, configuration is done at compile-time by a
single config.h file. dwm reads from standard input to print arbitrary status
text such as the date and/or system load.

WWW: https://dwm.suckless.org/
 2020年12月17日に「Freebsd 12.2 RELEASE」へインストールしたときと変化ありません。

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. ユーザ用初期化ファイルの作成

 「root」ユーザ権限で。

sh
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
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
 うまく設定できていれば、ログイン画面が表示されます。  ユーザ名・パスワードを入力してログインします。
「dwm FreeBSD 13.0」-「ログイン画面」

ハイスピードプランPoint anytime