2. インストール
pkg install -y xorg numlockx ja-font-migmix
pkg install -y sddm sddm-freebsd-black-theme hal cursor-neutral-white-theme
pkg install -y qtile
この後で、「python」のモジュールを入れ替えます。
そうしないと「qtile」起動時に
pkg_resources.DistributionNotFound: The 'xcffib>=0.8.1' distribution was not found and is required by qtile
と、こけてしまいます。
「py-xcffib」のバージョンが、「qtile」の必要とするものにあっていないようなのです。
いささか無理やりなことをします。
「pip」のインストール。
「python3.7」なので
pkg install -y py37-pip
「xcffib」のアンインストール。
pip uninstall xcffib
インストール。
pip install xcffib
これで、「xcffib」のバージョンは「0.10.1」になりました。
2020年9月4日の時点で、「qtile」は下記のバージョンでした。
$ pkg info qtile
qtile-0.14.2
Name : qtile
Version : 0.14.2
Installed on : Wed Sep 16 13:36:06 2020 JST
Origin : x11-wm/qtile
Architecture : FreeBSD:11:*
Prefix : /usr/local
Categories : x11-wm
Licenses : MIT
Maintainer : ericbsd@FreeBSD.org
WWW : http://qtile.org
Comment : Small, flexible, scriptable tiling window manager written in Python
Options :
DOCS : on
Annotations :
repo_type : binary
repository : FreeBSD
Flat size : 2.40MiB
Description :
Qtile is simple, small, and extensible. It's easy to write your own layouts,
widgets, and built-in commands.
Qtile is written and configured entirely in Python, which means you can
leverage the full power and flexibility of the language to make it fit your
needs.
WWW: http://qtile.org
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 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」ファイルは、作成せず、「SDDM」の機能を利用して、「.xinitrc」で起動します。
「root」ユーザで
cat << EOF >> /usr/share/skel/dot.xinitrc
#!/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 &
#xsetroot -cursor_name left_ptr
if [ -e /usr/local/bin/VBoxClient-all ]; then
/usr/local/bin/VBoxClient-all
fi
qtile
EOF
chmod +x /usr/share/skel/dot.xinitrc
既存のログインユーザで、まず、セッション開始の手順をスケルトンよりコピー。
cp /usr/share/skel/dot.xinitrc ~/.xinitrc
ログインユーザ用の起動時のスクリプトをシステムファイルからコピーします。
mkdir -pv ~/.config/qtile/
cp /usr/local/lib/python3.7/site-packages/libqtile/resources/default_config.py ~/.config/qtile/config.py
5. /etc/rc.conf 編集
前項までインストール・設定したものを有効にします。
「root」ユーザで
cat << EOF >> /etc/rc.conf
polkitd_enable="YES"
dbus_enable="YES"
hald_enable="YES"
sddm_enable="YES"
EOF
6. ログインマネージャ起動
「root」ユーザで
service dbus start
service hald start
service sddm start
うまく設定できていれば、ログイン画面が表示されます。
ユーザ名・パスワードを入力してログインします。