3
4

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?

More than 1 year has passed since last update.

EndeavourOS 初期設定メモ

Last updated at Posted at 2023-07-18

はじめに

Arch Linux 系はほとんど触れたことないこともあり、個人的なメモ。

ちな、 EndeavourOS Cassini Nova R2 をオフラインインストールした。

デスクトップ用途です。言語設定、キーボード設定、時刻設定、ホスト名などはインストール時に設定したもののまま使用。

各種インストールなど

システムアップデート

shell
$ sudo pacman -S archlinux-keyring
$ sudo pacman -Syu
$ sudo reboot

pacman コマンドは -S でインストール (Sync) 。 -S のときに使えるサブオプションとして

  • -y : リポジトリのデータベースをリフレッシュ
  • -u : パッケージのアップグレード

などがあり、他にも検索とかいろいろある。

特定のパッケージを名指しして pacman -Sy package_name とするのは依存関係の問題が起きる可能性があるため非推奨とのこと(この使い方をしている参考ページは散見される)。

タッチパッドの設定

タッチパッドの設定ファイルを作成し、1本指でクリックした際は左クリック、2本指でクリックした際は右クリックとして認識されるように設定する。

shell
$ cat <<EOT | sudo tee /etc/X11/xorg.conf.d/30-touchpad.conf
Section "InputClass"
  Identifier "touchpad"
  Driver "libinput"
  MatchIsTouchpad "on"
  Option "Tapping" "on"
  Option "ClickMethod" "clickfinger"
  Option "TappingButtonMap" "lrm"
  Option "NaturalScrolling" "false"
EndSection
EOT

vim / gvim のインストール

shell
$ sudo pacman -S gvim

インプットメソッドのインストール、設定

shell
$ sudo pacman -S fcitx5-im fcitx5-mozc
shell
$ cat <<EOT >>~/.xprofile
GTK_IM_MODULE=fcitx
QT_IM_MODULE=fcitx
XMODIFIERS=@im=fcitx
EOT

IM として fcitx5 を使うため、環境変数を設定してログインしなおす。環境変数を ~/.xprofile に書くのは X11 までで Wayland の場合は別の方法をとる必要がある。

インストール後、使用する変換エンジンとして mozc を使用するよう設定が必要。メニューの [Settings] → [Fcitx 5 Configuration] から GUI で設定ができる。右のリストにある Mozc を左のリストに移す。

設定ファイルは ~/.config/fcitx5/profile だが、稼働中の fcitx5 の有効な設定はどこか(メモリ上か一時ファイル?)にあり、設定ファイルを書き換えても反映されないばかりか、下手すると書き換える前の内容で上書きされる。

設定ファイルを反映させる場合は、一旦 fcitx5 のプロセスを切ったのちに設定ファイルを書き換え、再度プロセスを立ち上げる必要があるようだ。

設定ファイルはこんなの。

~/.config/fcitx5/profile
[Groups/0]
# Group Name
Name="Group 2"
# Layout
Default Layout=us
# Default Input Method
DefaultIM=keyboard-us

[Groups/0/Items/0]
# Name
Name=keyboard-us
# Layout
Layout=

[Groups/1]
# Group Name
Name="Group 1"
# Layout
Default Layout=jp
# Default Input Method
DefaultIM=mozc

[Groups/1/Items/0]
# Name
Name=keyboard-jp
# Layout
Layout=

[Groups/1/Items/1]
# Name
Name=mozc
# Layout
Layout=

[GroupOrder]
0="Group 1"
1="Group 2"

vim の fcitx プラグイン

日本語フォント

shell
$ sudo pacman -S ipa-fonts
$ sudo pacman -S ttf-hanazono ttf-sazanami

Firefox などのフォントを好みに応じて変える。

他のフォント (AUR)

M+ フォントや Ricky は AUR からインストールすることもできる。

特になくてもいいけど、 AUR の使い方のメモとして。

AUR (Arch User Repository) は公式の core リポジトリや extra リポジトリと異なり、バイナリではなく Makefile 的な PKGBUILD ファイルとして配布されている。それをもとに makepkg でビルドし、ビルドしたパッケージを pacman -U でインストールする。

M+ フォントの例。

shell
$ git clone https://aur.archlinux.org/ttf-mplus.git

$ ls ./ttf-mplus
PKGBUILD

$ cat ./ttf-mplus/PKGBUILD 
# Maintainer: 5donuts <5donuts@protonmail.com>
# Contributor: noonov <noonov@gmail.com>

pkgname=ttf-mplus
pkgver=TESTFLIGHT_063a
_pkgver=${pkgver/_/-}
pkgrel=1
pkgdesc="M+ Japanese outline fonts; Use 'ttf-mplus-git' or 'otf-mplus-git' instead: upstream no longer updated."
arch=('any')
url="http://mplus-fonts.osdn.jp/mplus-outline-fonts/index-en.html"
license=('custom')
depends=('fontconfig')
_mirror="jaist"
source=(http://${_mirror}.dl.osdn.jp/mplus-fonts/62344/mplus-${_pkgver}.tar.xz)
sha256sums=('44eb973b4b6aff574de454db105ddc23e6749c2294734bd9cb1e0d734e4cdd79')

package() {
  cd ${srcdir}/mplus-${_pkgver}

  install -d ${pkgdir}/usr/share/fonts/TTF
  install -m644 *.ttf ${pkgdir}/usr/share/fonts/TTF/

  install -D -m644 LICENSE_E \
          ${pkgdir}/usr/share/licenses/${pkgname}/COPYING
}

PKGBUILD ファイルを取得できたら makepkg する。

-s を付けると依存しているパッケージを先にインストールする。 -i を付けると、ビルドしたパッケージのインストール ( pacman -U ) を同時に実施する。

shell
$ cd ./ttf-mplus

$ makepkg -si
==> Making package: ttf-mplus TESTFLIGHT_063a-1 (2023年07月18日 17時50分01秒)
==> Checking runtime dependencies...
==> Checking buildtime dependencies...
==> Retrieving sources...
  -> Downloading mplus-TESTFLIGHT-063a.tar.xz...
  % Total    % Received % Xferd  Average Speed   Time    Time     Time  Current
                                 Dload  Upload   Total   Spent    Left  Speed
100  9.8M  100  9.8M    0     0  2688k      0  0:00:03  0:00:03 --:--:-- 2688k
==> Validating source files with sha256sums...
    mplus-TESTFLIGHT-063a.tar.xz ... Passed
==> Extracting sources...
  -> Extracting mplus-TESTFLIGHT-063a.tar.xz with bsdtar
==> Entering fakeroot environment...
==> Starting package()...
==> Tidying install...
  -> Removing libtool files...
  -> Purging unwanted files...
  -> Removing static library files...
  -> Stripping unneeded symbols from binaries and libraries...
  -> Compressing man and info pages...
==> Checking for packaging issues...
==> Creating package "ttf-mplus"...
  -> Generating .PKGINFO file...
  -> Generating .BUILDINFO file...
  -> Generating .MTREE file...
  -> Compressing package...
==> Leaving fakeroot environment.
==> Finished making: ttf-mplus TESTFLIGHT_063a-1 (2023年07月18日 17時50分10秒)
==> Installing package ttf-mplus with pacman -U...
loading packages...
resolving dependencies...
looking for conflicting packages...

Package (1)  New Version        Net Change

ttf-mplus    TESTFLIGHT_063a-1   70.62 MiB

Total Installed Size:  70.62 MiB

:: Proceed with installation? [Y/n] 
(1/1) checking keys in keyring                                        [--------------------------------------] 100%
(1/1) checking package integrity                                      [--------------------------------------] 100%
(1/1) loading package files                                           [--------------------------------------] 100%
(1/1) checking for file conflicts                                     [--------------------------------------] 100%
:: Processing package changes...
(1/1) installing ttf-mplus                                            [--------------------------------------] 100%
:: Running post-transaction hooks...
(1/2) Arming ConditionNeedsUpdate...
(2/2) Updating fontconfig cache...

以下

メモに残したいと思ったときに追記予定

ボツ

(ボツ)タッチパッドの設定

.xinitrc の理解が不十分のためか、うまく設定が機能しませんでした。メモのために残しておきます。

デバイスの id は固定ではないため、デバイス名を使うか awk などを用いてデバイス id を抜き出して設定する必要がありますが、下記では未対応です。

ノートパソコンによるかもしれないが、タッチパッドの下部のうち、左側を押すと左クリック、真ん中あたりを押すと中クリック、右側を押すと右クリックとして認識される状態であった。

ブラウザのタブなどをクリックしたつもりが、中クリックとして押下されタブが閉じられてしまうトラブルが多発したため、マッピングを変更する。

shell
$ xinput list
⎡ Virtual core pointer                    	id=2	[master pointer  (3)]
⎜   ↳ Virtual core XTEST pointer              	id=4	[slave  pointer  (2)]
⎜   ↳ ASUE1409:00 04F3:3157 Touchpad          	id=10	[slave  pointer  (2)]
⎜   ↳ ASUE1409:00 04F3:3157 Mouse             	id=12	[slave  pointer  (2)]
⎣ Virtual core keyboard                   	id=3	[master keyboard (2)]
    ↳ Virtual core XTEST keyboard             	id=5	[slave  keyboard (3)]
    ↳ Power Button                            	id=6	[slave  keyboard (3)]
    ↳ Video Bus                               	id=7	[slave  keyboard (3)]
    ↳ Lid Switch                              	id=8	[slave  keyboard (3)]
    ↳ Power Button                            	id=9	[slave  keyboard (3)]
    ↳ ASUE1409:00 04F3:3157 Keyboard          	id=11	[slave  keyboard (3)]
    ↳ Asus WMI hotkeys                        	id=13	[slave  keyboard (3)]
    ↳ AT Translated Set 2 keyboard            	id=14	[slave  keyboard (3)]

タッチパッドは id=10 。

shell
$ xinput get-button-map 10
1 2 3 4 5 6 7

$ xinput list 10
ASUE1409:00 04F3:3157 Touchpad          	id=10	[slave  pointer  (2)]
	Reporting 7 classes:
		Class originated from: 10. Type: XIButtonClass
		Buttons supported: 7
		Button labels: "Button Left" "Button Middle" "Button Right" "Button Wheel Up" "Button Wheel Down" "Button Horiz Wheel Left" "Button Horiz Wheel Right"
		Button state:
		Class originated from: 10. Type: XIValuatorClass
		Detail for Valuator 0:
		  Label: Rel X
		  Range: -1.000000 - -1.000000
		  Resolution: 0 units/m
		  Mode: relative
		Class originated from: 10. Type: XIValuatorClass
		Detail for Valuator 1:
		  Label: Rel Y
		  Range: -1.000000 - -1.000000
		  Resolution: 0 units/m
		  Mode: relative
		Class originated from: 10. Type: XIValuatorClass
		Detail for Valuator 2:
		  Label: Rel Horiz Scroll
		  Range: -1.000000 - -1.000000
		  Resolution: 0 units/m
		  Mode: relative
		Class originated from: 10. Type: XIValuatorClass
		Detail for Valuator 3:
		  Label: Rel Vert Scroll
		  Range: -1.000000 - -1.000000
		  Resolution: 0 units/m
		  Mode: relative
		Class originated from: 10. Type: XIScrollClass
		Scroll info for Valuator 2
		  type: 2 (horizontal)
		  increment: 120.000000
		  flags: 0x0
		Class originated from: 10. Type: XIScrollClass
		Scroll info for Valuator 3
		  type: 1 (vertical)
		  increment: 120.000000
		  flags: 0x0

1から7までがマッピングされている。2(中クリック)の判定のとき、1(左クリック)として認識させたいので

shell
$ echo "xinput set-button-map 10 1 1 3 4 5 6 7" >>~/.xinitrc
3
4
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
3
4

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?