cwm - FreeBSD 13.0 RELEASE - 環境構築

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

1. 概要

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

 ここまでの時点で、システムインストールと「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 cwm
 最後の行の「cwm」のインストールは、一瞬で終わります。  2022年4月11日の時点で、「cwm」のバージョンは、下記の通りでした。

$ pkg info cwm
cwm-6.7
Name           : cwm
Version        : 6.7
Installed on   : Mon Apr 11 18:30:57 2022 JST
Origin         : x11-wm/cwm
Architecture   : FreeBSD:13:amd64
Prefix         : /usr/local
Categories     : x11-wm
Licenses       : ISCL
Maintainer     : me@emilengler.com
WWW            : https://github.com/leahneukirchen/cwm
Comment        : Minimalistic window manager for X11 based on evilwm
Shared Libs required:
        libXrandr.so.2
        libXft.so.2
        libX11.so.6
Annotations    :
        FreeBSD_version: 1300139
        repo_type      : binary
        repository     : FreeBSD
Flat size      : 99.7KiB
Description    :
cwm is a window manager for X11 initially inspired by evilwm. cwm has several
novel features, including the ability to search for windows. it features a
very simple and attractive aesthetic.

WWW: https://github.com/leahneukirchen/cwm

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

exec cwm
EOF

cat << 'EOF' >> /usr/share/skel/dot.xprofile
#!/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

/usr/local/bin/VBoxClient-all
EOF
exit

chmod +x /usr/share/skel/dot.xsession
 既存のログインユーザで

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

5. /etc/rc.conf 編集

 前項までインストール・設定したものを有効にします。

sysrc polkitd_enable=YES
sysrc dbus_enable=YES
sysrc sddm_enable=YES

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

 「root」ユーザで

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

ハイスピードプラン神戸養蜂場ネットオークションの相場、統計、価格比較といえばオークファンメンズミレット