qtile - FreeBSD 12.3 - 環境構築


 クラウディア


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

1. 概要

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

 ここまでの時点で、システムインストールと「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 py38-qtile
 2020年9月4日の時点で、「FreeBSD 11.4 RELEASE」へインストールした時期は、「python」のモジュールのバージョンがあっていないため、モジュールの入れ替えが必要でした。  2020年11月13日、「FreeBSD 12.2 RELEASE」へのインストール以降は、パッケージが更新されているようで、上記の手間はかかりませんでした。  2022年 1月 4日、「FreeBSD 12.3 RELEASE」へのインストール時は、パッケージが変わっています。  2022年1月4日の時点で、「qtile」は下記のバージョンでした。

$ pkg info py38-qtile
py38-qtile-0.18.1
Name           : py38-qtile
Version        : 0.18.1
Installed on   : Tue Jan  4 10:13:09 2022 JST
Origin         : x11-wm/qtile
Architecture   : FreeBSD:12:*
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      : 3.20MiB
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
 2020年9月4日「FreeBSD 11.4 RELEASE」へのインストール、2020年11月13日「FreeBSD 12.1 RELEASE」へのインストール、2021年7月1日「FreeBSD 13.0」へのインストール時は、「qtile-0.14.2」でした。  今回、久々にバージョンが変わっています。

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

 「.desktop」ファイルは、作成せず、「SDDM」の機能を利用して、「.xinitrc」で起動します。  「root」ユーザ権限で。

sh
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
#
numlockx &

qtile
EOF
exit

chmod +x /usr/share/skel/dot.xinitrc
 「VBoxClient」の起動は、次ページ以降、自動起動の設定で行います。  既存のログインユーザで、まず、セッション開始の手順をスケルトンよりコピー。

cp /usr/share/skel/dot.xinitrc ~/.xinitrc
 ログインユーザ用の起動時のスクリプトをシステムファイルからコピーします。

mkdir -pv ~/.config/qtile/
cp /usr/local/lib/python3.8/site-packages/libqtile/resources/default_config.py ~/.config/qtile/config.py

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


earthcar(アースカー)
Star Naming Gift
ハイスピードプラン