matoken's blog https://matoken.org/blog Is there no plan B? Tue, 10 Nov 2026 09:46:51 +0000 ja hourly 1 https://wordpress.org/?v=7.1.4 https://matoken.org/blog/wp-content/uploads/2025/03/cropped-1865f695c4eecc844385acef2f078255036adccd42c254580ea3844543ab56d9-32x32.jpeg matoken's blog https://matoken.org/blog 32 32 YomiToku 0.16.0で歪み補正に対応 https://matoken.org/blog/2026/11/10/yomitoku-0-16-0-dewarp/ https://matoken.org/blog/2026/11/10/yomitoku-0-16-0-dewarp/#respond Tue, 10 Nov 2026 09:46:51 +0000 https://matoken.org/blog/?p=5816

AIを活用した日本語文書解析エンジンを提供するYomiToku 0.16.0がリリースされました.このバージョンの新機能で歪み補正機能がつきました.

🚀 機能追加

feat: add geometric correction (dewarping) preprocessing for photogra… @kotaro-kinoshita (#267)

ページ検知・幾何補正(歪み補正)

–dewarp を指定すると、カメラで撮影した画像から複数の書類(見開きの左右のページ、並べたレシートや名刺など)の領域を検知し、書類ごとに湾曲・カール・傾き・台形の歪みを補正したうえで、ページごとにドキュメント解析(OCR・レイアウト解析)を行います。1 枚の写真に複数の書類が写っていても、撮影し直したり切り出したりすることなく、それぞれを独立した平らな文書として解析できます。紙の輪郭を抽出して四隅を射影変換するだけの単純な補正ではなく、紙面全体の歪みを推定する非線形な補正のため、紙の湾曲やカールも平らに戻せます。紙の一部が画像の外に見切れている写真や、影・照明ムラのある写真にもロバストです。

導入

README.mdにはpip install yomitokuが案内されています.
自分はpipxで入れていたので pipx upgrade で更新します.

$ pipx upgrade yomitoku
upgraded package yomitoku from 0.15.1 to 0.16.2 (location: /home/matoken/.local/pipx/venvs/yomitoku)
$ pipx list | grep yomitoku
   package yomitoku 0.16.2, installed using Python 3.14.10
    - yomitoku
    - yomitoku_extract
    - yomitoku_extract_with_llm
    - yomitoku_mcp
    - yomitoku_table
Note
0.16.0, 0.16.1 のときはPyPIが更新されていなかったので更新できていませんでした.sourceからbuildするとモデルの取得に失敗していました.
`--dewarp* のオプションが増えています.
$ yomitoku
usage: yomitoku [-h] [-f FORMAT] [-v] [-o OUTDIR] [-l] [-d DEVICE] [--td_cfg TD_CFG] [--tr_cfg TR_CFG] [--lp_cfg LP_CFG] [--tsr_cfg TSR_CFG] [--tr_name TR_NAME] [--td_name TD_NAME] [--ignore_line_break] [--figure] [--figure_letter]
                [--figure_width FIGURE_WIDTH] [--figure_dir FIGURE_DIR] [--encoding ENCODING] [--combine] [--ignore_meta] [--split_text_across_cells] [--reading_order {auto,left2right,top2bottom,right2left}] [--font_path FONT_PATH]
                [--pdf_quality {high,middle,low}] [--dpi DPI] [--pages PAGES] [--enable-rec-orientation-fallback] [--rec-orientation-fallback-thresh REC_ORIENTATION_FALLBACK_THRESH] [--disable-repetition-stop] [--ignore_ruby]
                [--ruby_threshold RUBY_THRESHOLD] [--dewarp] [--dewarp_coordinate {dewarped,photo}] [--dewarp_model {pagenet_v1,uvdoc_v1}] [--dewarp_cfg DEWARP_CFG]
                arg1
yomitoku: error: the following arguments are required: arg1

YomiToku 歪み補正を試す

早速試します.初回実行時はモデルのダウンロードが行われます.

$ yomitoku IMG_20261105_052440714_MFNR.jpg -f md -o results -v --dewarp
2026-11-10 18:15:52,756 - yomitoku.base - INFO - Initialize TextDetector
Warning: You are sending unauthenticated requests to the HF Hub. Please set a HF_TOKEN to enable higher rate limits and faster downloads.
2026-11-10 18:15:54,463 - yomitoku.base - WARNING - CUDA is not available. Use CPU instead.
2026-11-10 18:15:54,467 - yomitoku.base - INFO - Initialize TextRecognizer
model.safetensors: downloading bytes: ████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████|  191MB,  900kB/s
model.safetensors: reconstructing file: 100%|████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████|  201MB /  201MB, 13.8MB/s
2026-11-10 18:20:36,816 - yomitoku.base - WARNING - CUDA is not available. Use CPU instead.
2026-11-10 18:20:36,820 - yomitoku.base - INFO - Initialize LayoutParser
2026-11-10 18:20:38,608 - yomitoku.base - WARNING - CUDA is not available. Use CPU instead.
2026-11-10 18:20:38,613 - yomitoku.base - INFO - Initialize TableStructureRecognizer
2026-11-10 18:20:39,895 - yomitoku.base - WARNING - CUDA is not available. Use CPU instead.
2026-11-10 18:20:39,906 - yomitoku.base - INFO - Initialize PageDewarper
model.safetensors: downloading bytes: ████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████| 41.1MB,  879kB/s
model.safetensors: reconstructing file: 100%|████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████| 43.9MB / 43.9MB, 3.05MB/s
2026-11-10 18:21:39,510 - yomitoku.base - WARNING - CUDA is not available. Use CPU instead.
2026-11-10 18:21:39,512 - yomitoku.cli.main - INFO - Output directory: results
2026-11-10 18:21:39,512 - yomitoku.cli.main - INFO - Processing file: IMG_20261105_052440714_MFNR.jpg
2026-11-10 18:21:43,968 - yomitoku.base - INFO - PageDewarper __call__ elapsed_time: 4.1905553340911865
2026-11-10 18:21:46,815 - yomitoku.base - INFO - LayoutParser __call__ elapsed_time: 2.8465828895568848
2026-11-10 18:21:46,906 - yomitoku.base - INFO - TableStructureRecognizer __call__ elapsed_time: 0.07313704490661621
2026-11-10 18:21:49,201 - yomitoku.base - INFO - TextDetector __call__ elapsed_time: 5.232101917266846
2026-11-10 18:21:56,776 - yomitoku.base - INFO - TextRecognizer __call__ elapsed_time: 7.564051151275635
2026-11-10 18:21:57,103 - yomitoku.cli.main - INFO - Output file: results/_IMG_20261105_052440714_MFNR_p1_dewarp_grid.jpg
2026-11-10 18:21:57,173 - yomitoku.cli.main - INFO - Output file: results/_IMG_20261105_052440714_MFNR_p1_dewarped.jpg
2026-11-10 18:21:57,239 - yomitoku.cli.main - INFO - Output file: results/_IMG_20261105_052440714_MFNR_p1_ocr.jpg
2026-11-10 18:21:57,323 - yomitoku.cli.main - INFO - Output file: results/_IMG_20261105_052440714_MFNR_p1_layout.jpg
2026-11-10 18:21:57,330 - yomitoku.cli.main - INFO - Total Processing time: 17.82 sec

今回レシートをまるめて試してみました.はじめ画像が90度横になってしまっていたのですがそのまま.でも文字起こしはいまいちだったので縦にして再度行いました.正しい角度のほうが精度いい感じです.

yomitoku 0.16.2 dewarp
$ cat results/_IMG_20261105_052440714_MFNR-tate_p1.md
まちなかバーク

領 収 証

入庫日時 2026年11月02日 18時27分<br>出庫日時 2026年11月02日 21時52分<br>No.01\-000395 券No.02\-473787

駐車料金\(一般 \)

割引<br>\(サービス1\)

料金計

投入現金<br>釣銭額

全て消費税10%適用対象<br>登録番号:T6340001014199<br>株式会社 まちづくり鹿屋

600円

5枚

500円引

100円

100円<br>0円

10180

雑誌などで裁断せず開いた状態の画像なんかも試してみようと思います.

]]>
https://matoken.org/blog/2026/11/10/yomitoku-0-16-0-dewarp/feed/ 0
Meltype 1.5.0でLinux版にも設定画面が追加された https://matoken.org/blog/2026/11/09/settings-added-with-meltype-1-5-0/ https://matoken.org/blog/2026/11/09/settings-added-with-meltype-1-5-0/#respond Sun, 08 Nov 2026 22:31:46 +0000 https://matoken.org/blog/?p=5808

日本語入力システムのMeltype 1.5.0がリリースされました。

Linux関連の差分を見ていくと、
Linuxに設定画面 meltype-settings が追加されました。これに伴い依存関係が増えているようです。
これまでも.rpmはありましたが、RHEL 9 系に対応したようです。
https://github.com/yksr-melt/Meltype/pull/1518インストール、アンインストールスクリプトが廃止]になりました。
旧スクリプトからの移行は Linux のインストール手順に書かれています。

DebianでのMeltypeアップグレード

GitHub releasesからamd64の.debをダウンロードしてapt installで上書きしました。

$ wget -c https://github.com/yksr-melt/Meltype/releases/download/v1.5.0/meltype_1.5.0_amd64.deb
$ $ sha256sum meltype_1.5.0_amd64.deb
b7d6930de03262e00b31061ce88d29830a70a4f7d957e59f03a145810fed442e  meltype_1.5.0_amd64.deb
$ vt file `sha256sum meltype_1.5.0_amd64.deb | cut -f1 -d\ ` --format json | jq '.[0].last_analysis_stats'
{
  "confirmed-timeout": 0,
  "failure": 1,
  "harmless": 0,
  "malicious": 0,
  "suspicious": 0,
  "timeout": 4,
  "type-unsupported": 14,
  "undetected": 56
}
$ sudo apt install ./meltype_1.5.0_amd64.deb

この後fcitx5-config-qt を起動して更新ボタンで反映します。

設定画面の起動

設定画面を meltype-settings で起動しようとしたのですが、以下のようなウィンドウが表示されるだけでうまくいきません。

Meltypeの設定を開けません

/home/matoken/.local/share/Meltype/config.schema.jsonがありません。
Meltypeで一度文字を入力してから、設定画面を開き直してください

meltype 1.5.0 failed to open setting

しばらく入力した後でも駄目で config.schema.json が作られません。

ファイルを作ってあげればと思いましたが、これはきりがなさそうだなと諦めました。

$ touch ~/.local/share/Meltype/config.schema.json
$ meltype-settings
Traceback (most recent call last):
  File "/usr/bin/meltype-settings", line 310, in activate
    schema = read_schema(directory)
  File "/usr/bin/meltype-settings", line 114, in read_schema
    return json.loads(path.read_text(encoding="utf-8"))
           ~~~~~~~~~~^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/lib/python3.14/json/__init__.py", line 352, in loads
    return _default_decoder.decode(s)
           ~~~~~~~~~~~~~~~~~~~~~~~^^^
  File "/usr/lib/python3.14/json/decoder.py", line 345, in decode
    obj, end = self.raw_decode(s, idx=_w(s, 0).end())
               ~~~~~~~~~~~~~~~^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/lib/python3.14/json/decoder.py", line 363, in raw_decode
    raise JSONDecodeError("Expecting value", s, err.value) from None
json.decoder.JSONDecodeError: Expecting value: line 1 column 1 (char 0)
$ echo '{}' > ~/.local/share/Meltype/config.schema.json
$ meltype-settings
Traceback (most recent call last):
  File "/usr/bin/meltype-settings", line 311, in activate
    config = ConfigFile(directory, schema)
  File "/usr/bin/meltype-settings", line 72, in __init__
    self.settings_version = schema["properties"]["SettingsVersion"]["default"]
                            ~~~~~~^^^^^^^^^^^^^^
KeyError: 'properties'
$ echo '{["meltype-settings"]}' > ~/.local/share/Meltype/config.schema.json
$ meltype-settings
Traceback (most recent call last):
  File "/usr/bin/meltype-settings", line 310, in activate
    schema = read_schema(directory)
  File "/usr/bin/meltype-settings", line 114, in read_schema
    return json.loads(path.read_text(encoding="utf-8"))
           ~~~~~~~~~~^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/lib/python3.14/json/__init__.py", line 352, in loads
    return _default_decoder.decode(s)
           ~~~~~~~~~~~~~~~~~~~~~~~^^^
  File "/usr/lib/python3.14/json/decoder.py", line 345, in decode
    obj, end = self.raw_decode(s, idx=_w(s, 0).end())
               ~~~~~~~~~~~~~~~^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/lib/python3.14/json/decoder.py", line 361, in raw_decode
    obj, end = self.scan_once(s, idx)
               ~~~~~~~~~~~~~~^^^^^^^^
json.decoder.JSONDecodeError: Expecting property name enclosed in double quotes: line 1 column 2 (char 1)
$ rm ~/.local/share/Meltype/config.schema.json

結局、fcitx5 を再起動することで config.schema.json が作成されたようです。Meltype 更新時に更新ボタンではなく再起動ボタンを押せばよかったのかもしれません。

meltype 1.5.0 fcitx5 restart

設定画面はこんな感じ。結構大量。上部の「設定を検索」が活躍しそうです。

meltype 1.5.0 setting

環境

$ dpkg-query -W meltype fcitx5
fcitx5  5.1.23-1
meltype 1.5.0
$ lsb_release -dr
Description:    Debian GNU/Linux forky/sid
Release:        n/a
$ arch
x86_64
]]>
https://matoken.org/blog/2026/11/09/settings-added-with-meltype-1-5-0/feed/ 0
VPSのDebianをunattended-upgradeで自動アップグレード https://matoken.org/blog/2026/10/30/automatically-upgrade-debian-on-vps-with-unattended-upgrade/ https://matoken.org/blog/2026/10/30/automatically-upgrade-debian-on-vps-with-unattended-upgrade/#respond Thu, 29 Oct 2026 22:08:06 +0000 https://matoken.org/blog/?p=5793

VPSをいくつか契約しています。システムのアップグレードは手動で行っています。
でも数日PCに触れないことなんかもあり最近の情勢からすると不安。ということでシステムの自動アップグレードを設定しました。

今回の対象はDebian trixie amd64環境。これまではapticronを動かしてパッケージの更新とダウンロードは自動化していました。
以前はcron-aptを使っていましたが、今回 unattended-upgradesを試してみました.

unattended-upgrades を導入

aptでunattended-upgradesを導入して設定します。

$ sudo apt install unattended-upgrades (1)
$ sudo dpkg-reconfigure unattended-upgrades (2)
Package configuration



  ┌───────────────────┤ Configuring unattended-upgrades ├───────────────────┐
  │                                                                         │
  │ Applying updates on a frequent basis is an important part of keeping    │
  │ systems secure. By default, updates need to be applied manually using   │
  │ package management tools. Alternatively, you can choose to have this    │
  │ system automatically download and install important updates.            │
  │                                                                         │
  │ Automatically download and install stable updates?                      │
  │                                                                         │
  │                    <Yes>                       <No>                     │
  │                                                                         │
  └─────────────────────────────────────────────────────────────────────────┘





Replacing config file /etc/apt/apt.conf.d/20auto-upgrades with new version
$ cat  /etc/apt/apt.conf.d/20auto-upgrades
APT::Periodic::Update-Package-Lists "1";
APT::Periodic::Unattended-Upgrade "1";
  1. unattended-upgradesパッケージを導入

  2. dpkg-reconfigure で <Yes> を選択

unattended upgrades

メール通知を有効にする

$ sudo vi /etc/apt/apt.conf.d/50unattended-upgrades
$ sudo git -C /etc diff /etc/apt/apt.conf.d/50unattended-upgrades
diff --git a/apt/apt.conf.d/50unattended-upgrades b/apt/apt.conf.d/50unattended-upgrades
index 26f84e133..007af9182 100644
--- a/apt/apt.conf.d/50unattended-upgrades
+++ b/apt/apt.conf.d/50unattended-upgrades
@@ -92,13 +92,13 @@ Unattended-Upgrade::Package-Blacklist {
 // If empty or unset then no email is sent, make sure that you
 // have a working mail setup on your system. A package that provides
 // 'mailx' must be installed. E.g. "user@example.com"
-//Unattended-Upgrade::Mail "";
+Unattended-Upgrade::Mail "user@example.com"; (1)

 // Set this value to one of:
 //    "always", "only-on-error" or "on-change"
 // If this is not set, then any legacy MailOnlyOnError (boolean) value
 // is used to chose between "only-on-error" and "on-change"
-//Unattended-Upgrade::MailReport "on-change";
+Unattended-Upgrade::MailReport "always"; (2)

 // Remove unused automatically installed kernel-related packages
 // (kernel images, kernel headers and kernel version locked tools).
$ sudo unattended-upgrade --dry-run --debug (3)
$ sudo unattended-upgrade --debug
  1. 通知を送るメールアドレス

  2. 実行舞に通知。しばらく動かしたら on-change に変更予定

  3. 動作確認

apticronはアンインストール
$ sudo apt remove apticron

しばらく動かして見て問題なければ別のVPSにも反映しようと思います。

環境

$ dpkg-query -W unattended-upgrades
unattended-upgrades     2.12
$ lsb_release -dr
Description:    Debian GNU/Linux 13 (trixie)
Release:        13
$ arch
x86_64

追記

数日動かして今のところいい感じ。と思ったらKernel updateで再起動が必要になりこれどうしようになっています。live patch……?

というだけじゃあれなので、届いたメールを貼っておきます。
今のところ正常パターンしかないのですが、再起動が必要なときにはSubjectに `[reboot required] ` が付くようです。

実行時のメール

アップデートがなかったとき

Subject: unattended-upgrades result for example.com: SUCCESS
From: root@example.com

Unattended upgrade result: No packages found that can be upgraded
unattended and no pending auto-removals

Unattended-upgrades log:
Checking if system is running on battery is skipped. Please install powermg=
mt-base package to check power status and skip installing updates when the =
system is running on battery.
Starting unattended upgrades script
Allowed origins are: origin=3DDebian,codename=3Dtrixie,label=3DDebian, orig=
in=3DDebian,codename=3Dtrixie,label=3DDebian-Security, origin=3DDebian,code=
name=3Dtrixie-security,label=3DDebian-Security
Initial blacklist:=20
Initial whitelist (not strict):=20
No packages found that can be upgraded unattended and no pending auto-remov=
als

更新があったとき

Subject: unattended-upgrades result for example.com: SUCCESS
From: root@example.com

Unattended upgrade result: All upgrades installed

Warning: A reboot is required to complete this upgrade, or a previous one.

Packages that were upgraded:
libnss3 vim vim-common vim-runtime vim-tiny xxd

Package installation log:
Log started: 2026-11-02 06:50:53
apt-listchanges: Reading changelogs…​
apt-listchanges: Reading changelogs…​
Preparing to unpack …​/vim_2%3a9.1.1230-2+deb13u1_amd64.deb …​
Unpacking vim (2:9.1.1230-2+deb13u1) over (2:9.1.1230-2) …​
Preparing to unpack …​/vim-common_2%3a9.1.1230-2+deb13u1_all.deb …​
Unpacking vim-common (2:9.1.1230-2+deb13u1) over (2:9.1.1230-2) …​
Preparing to unpack …​/vim-tiny_2%3a9.1.1230-2+deb13u1_amd64.deb …​
Unpacking vim-tiny (2:9.1.1230-2+deb13u1) over (2:9.1.1230-2) …​
Preparing to unpack …​/vim-runtime_2%3a9.1.1230-2+deb13u1_all.deb …​
Unpacking vim-runtime (2:9.1.1230-2+deb13u1) over (2:9.1.1230-2) …​
Preparing to unpack …​/xxd_2%3a9.1.1230-2+deb13u1_amd64.deb …​
Unpacking xxd (2:9.1.1230-2+deb13u1) over (2:9.1.1230-2) …​
Setting up xxd (2:9.1.1230-2+deb13u1) …​
Setting up vim-common (2:9.1.1230-2+deb13u1) …​
Setting up vim-runtime (2:9.1.1230-2+deb13u1) …​
Setting up vim (2:9.1.1230-2+deb13u1) …​
Setting up vim-tiny (2:9.1.1230-2+deb13u1) …​
Processing triggers for mailcap (3.74) …​
Processing triggers for hicolor-icon-theme (0.18-2) …​
Processing triggers for man-db (2.13.1-1) …​
Log ended: 2026-11-02 06:51:09

Log started: 2026-11-02 06:51:11
apt-listchanges: Reading changelogs…​
apt-listchanges: Reading changelogs…​
Preparing to unpack …​/libnss3_2%3a3.110-1+deb13u5_amd64.deb …​
Unpacking libnss3:amd64 (2:3.110-1+deb13u5) over (2:3.110-1+deb13u4) …​
Setting up libnss3:amd64 (2:3.110-1+deb13u5) …​
Processing triggers for libc-bin (2.41-12+deb13u4) …​
Log ended: 2026-11-02 06:51:17

Unattended-upgrades log:
Checking if system is running on battery is skipped. Please install powermgmt-base package to check power status and skip installing updates when the system is running on battery.
Starting unattended upgrades script
Allowed origins are: origin=Debian,codename=trixie,label=Debian, origin=Debian,codename=trixie,label=Debian-Security, origin=Debian,codename=trixie-security,label=Debian-Security
Initial blacklist:
Initial whitelist (not strict):
Packages that will be upgraded: libnss3 vim vim-common vim-runtime vim-tiny xxd
Writing dpkg log to /var/log/unattended-upgrades/unattended-upgrades-dpkg.log
All upgrades installed

kernelの更新があり再起動が必要なとき

Subject: [reboot required] unattended-upgrades result for example.com: SUCCESS
From: root@example.com

Unattended upgrade result: All upgrades installed

Warning: A reboot is required to complete this upgrade, or a previous one.

Packages that were upgraded:
linux-image-amd64 linux-libc-dev

Packages that were auto-removed:
linux-image-6.12.113+deb13-amd64

Package installation log:
Log started: 2026-11-03 06:16:00
apt-listchanges: Reading changelogs…​
apt-listchanges: Reading changelogs…​
Selecting previously unselected package linux-image-6.12.115+deb13.1-amd64.
Preparing to unpack …​/linux-image-6.12.115+deb13.1-amd64_6.12.115-2_amd64=
.deb …​
Unpacking linux-image-6.12.115+deb13.1-amd64 (6.12.115-2) …​
Preparing to unpack …​/linux-image-amd64_6.12.115-2_amd64.deb …​
Unpacking linux-image-amd64 (6.12.115-2) over (6.12.113-1) …​
Setting up linux-image-6.12.115+deb13.1-amd64 (6.12.115-2) …​
I: /vmlinuz.old is now a symlink to boot/vmlinuz-6.12.113+deb13-amd64
I: /initrd.img.old is now a symlink to boot/initrd.img-6.12.113+deb13-amd64
I: /vmlinuz is now a symlink to boot/vmlinuz-6.12.115+deb13.1-amd64
I: /initrd.img is now a symlink to boot/initrd.img-6.12.115+deb13.1-amd64
/etc/kernel/postinst.d/dkms:
dkms: WARNING: Linux headers are missing, which may explain the above failu=
res.
please install the linux-headers-6.12.115+deb13.1-amd64 package to fi=
x this.
/etc/kernel/postinst.d/initramfs-tools:
update-initramfs: Generating /boot/initrd.img-6.12.115+deb13.1-amd64
/etc/kernel/postinst.d/zz-update-grub:
Generating grub configuration file …​
Found linux image: /boot/vmlinuz-6.12.115+deb13.1-amd64
Found initrd image: /boot/initrd.img-6.12.115+deb13.1-amd64
Found linux image: /boot/vmlinuz-6.12.113+deb13-amd64
Found initrd image: /boot/initrd.img-6.12.113+deb13-amd64
Found linux image: /boot/vmlinuz-6.1.0-42-amd64
Found initrd image: /boot/initrd.img-6.1.0-42-amd64
Warning: os-prober will not be executed to detect other bootable partitions=
.
Systems on them will not be added to the GRUB boot configuration.
Check GRUB_DISABLE_OS_PROBER documentation entry.
Adding boot menu entry for UEFI Firmware Settings …​
done
Setting up linux-image-amd64 (6.12.115-2) …​
Log ended: 2026-11-03 06:16:35

Log started: 2026-11-03 06:16:37
apt-listchanges: Reading changelogs…​
apt-listchanges: Reading changelogs…​
Preparing to unpack …​/linux-libc-dev_6.12.115-2_all.deb …​
Unpacking linux-libc-dev (6.12.115-2) over (6.12.113-1) …​
Setting up linux-libc-dev (6.12.115-2) …​
Log ended: 2026-11-03 06:16:43

Log started: 2026-11-03 06:16:45
Removing linux-image-6.12.113+deb13-amd64 (6.12.113-1) …​
I: /vmlinuz.old is now a symlink to boot/vmlinuz-6.1.0-42-amd64
I: /initrd.img.old is now a symlink to boot/initrd.img-6.1.0-42-amd64
/etc/kernel/postrm.d/initramfs-tools:
update-initramfs: Deleting /boot/initrd.img-6.12.113+deb13-amd64
/etc/kernel/postrm.d/zz-update-grub:
Generating grub configuration file …​
Found linux image: /boot/vmlinuz-6.12.115+deb13.1-amd64
Found initrd image: /boot/initrd.img-6.12.115+deb13.1-amd64
Found linux image: /boot/vmlinuz-6.1.0-42-amd64
Found initrd image: /boot/initrd.img-6.1.0-42-amd64
Warning: os-prober will not be executed to detect other bootable partitions=
.
Systems on them will not be added to the GRUB boot configuration.
Check GRUB_DISABLE_OS_PROBER documentation entry.
Adding boot menu entry for UEFI Firmware Settings …​
done
Log ended: 2026-11-03 06:16:51

Unattended-upgrades log:
Checking if system is running on battery is skipped. Please install powermg=
mt-base package to check power status and skip installing updates when the =
system is running on battery.
Starting unattended upgrades script
Allowed origins are: origin=3DDebian,codename=3Dtrixie,label=3DDebian, orig=
in=3DDebian,codename=3Dtrixie,label=3DDebian-Security, origin=3DDebian,code=
name=3Dtrixie-security,label=3DDebian-Security
Initial blacklist:=20
Initial whitelist (not strict):=20
Packages that will be upgraded: linux-image-amd64 linux-libc-dev
Writing dpkg log to /var/log/unattended-upgrades/unattended-upgrades-dpkg.l=
og
All upgrades installed
Packages that were successfully auto-removed: linux-image-6.12.113+deb13-am=
d64
Packages that are kept back:=20

タイマー

/lib/systemd/system/apt-daily.timer (アップデートタイマー)
[Unit]
Description=Daily apt download activities

[Timer]
OnCalendar=*-*-* 6,18:00
RandomizedDelaySec=12h
Persistent=true

[Install]
WantedBy=timers.target
/lib/systemd/system/apt-daily-upgrade.timer (アップグレードタイマー)
[Unit]
Description=Daily apt upgrade and clean activities
After=apt-daily.timer

[Timer]
OnCalendar=*-*-* 6:00
RandomizedDelaySec=60m
Persistent=true

[Install]
WantedBy=timers.target
]]>
https://matoken.org/blog/2026/10/30/automatically-upgrade-debian-on-vps-with-unattended-upgrade/feed/ 0
ImpressiveでPDFスライドを自動再生 https://matoken.org/blog/2026/10/27/impressive%e3%81%a7pdf%e3%82%b9%e3%83%a9%e3%82%a4%e3%83%89%e3%82%92%e8%87%aa%e5%8b%95%e5%86%8d%e7%94%9f/ https://matoken.org/blog/2026/10/27/impressive%e3%81%a7pdf%e3%82%b9%e3%83%a9%e3%82%a4%e3%83%89%e3%82%92%e8%87%aa%e5%8b%95%e5%86%8d%e7%94%9f/#respond Mon, 26 Oct 2026 22:12:28 +0000 https://matoken.org/blog/?p=5775

先日開催された「鹿児島Linux勉強会 2026.10」の発表で「SBC再利用でディジタルサイネージを作る」というものがありました。
余っている古めのSBC(シングルボードコンピューター)をイベントの展示で利用するデジタルサイネージ取りて活用する話でした。
発表後デモ用のスライドを自動再生させたいという話に。

そういえば以前 #koedolug で @hatochan@mstdn.maud.io からhtmlでのプレゼンテーションツールのReveal.jsで同じようなことできないかなという話が出たときにAsciidoc Reveal.js で以下のようなスライドを試していました。

しかし今回はSBCでウェブブラウザは重いのでPDFスライドを自動再生させたいということで少し探してみました。

手元の端末に入っているいくつかのPDFプレゼンテーションツールのmanを見るとImpressiveにそれらしいオプションがあります。

-a <seconds> or --auto <seconds>
       Automatically advance to the next page after the given number of seconds. Together with the -w option (described below), this can be used to create automatic slideshows.
       Note that this option will not interrupt video playback: If a video is longer than the interval specified with --auto, it will be played until the end, but Impressive will change to the next page directly after that.
— man impressive
-w or --wrap
       If this option is set, Impressive will "wrap" over to the first page after the last page. In other words, advancing to the next page at the end of the presentation will restart the whole presentation.
— man impressive

この --auto と --wrap を使って実現できました.
ただ、ページ遷移時のトランジションがランダムでちょっと鬱陶しいようなということでトランジションのオプションも。

-t <trans1[,trans2...]> or --transition <trans1[,trans2...]>
       Using this switch, the set of transitions Impressive will randomly draw at page changes can be specified. If only one transition class is specified, this class will be used for all pages that do not have another transition ex‐
       plicitly assigned in their page properties. Multiple transitions have to be separated by commas; they will be used in random order. The -l option can be used to get a list of available transitions.
— man impressive

-l でトランジションの一覧が表示できます。これを -t , --transition に指定することでトランジションを指定できました。

$ impressive -l 2>/dev/null
Available transitions:
  Crossfade       - simple crossfade
  FadeOutFadeIn   - fade out to black and fade in again
  None            - no transition
  PagePeel        - an unrealistic, but nice page peel effect
  SlideDown       - slide downwards
  SlideLeft       - slide to the left
  SlideRight      - slide to the right
  SlideUp         - slide upwards
  SqueezeDown     - squeeze downwards
  SqueezeLeft     - squeeze to the left
  SqueezeRight    - squeeze to the right
  SqueezeUp       - squeeze upwards
* WipeBlobs       - wipe using nice "blob"-like patterns
  WipeBrightness1 - wipe based on the current slide's brightness
  WipeBrightness2 - wipe based on the next slide's brightness
  WipeCenterIn    - wipe from the corners inwards
* WipeCenterOut   - wipe from the center outwards
  WipeClouds      - wipe using cloud-like patterns
* WipeDown        - wipe downwards
  WipeDownLeft    - wipe from the upper-right to the lower-left corner
* WipeDownRight   - wipe from the upper-left to the lower-right corner
  WipeLeft        - wipe from right to left
* WipeRight       - wipe from left to right
  WipeUp          - wipe upwards
  WipeUpLeft      - wipe from the lower-right to the upper-left corner
  WipeUpRight     - wipe from the lower-left to the upper-right corner
(transitions with * are enabled by default)

ということで合わせてこんな感じで。

$ impressive \
  --auto 30 \ (1)
  --wrap \ (2)
  --transition None \ (3)
  slide.pdf (4)
  1. 30秒でページ送り

  2. 最終ページから最初のページに遷移

  3. トランジションを None に(カンマ区切りで複数指定可能)

  4. スライドPDF

]]>
https://matoken.org/blog/2026/10/27/impressive%e3%81%a7pdf%e3%82%b9%e3%83%a9%e3%82%a4%e3%83%89%e3%82%92%e8%87%aa%e5%8b%95%e5%86%8d%e7%94%9f/feed/ 0
PHPのリモートコード実行の緩和策のsession.upload_progress.enabled=0を設定 https://matoken.org/blog/2026/10/26/session-upload_progress-enabled0/ https://matoken.org/blog/2026/10/26/session-upload_progress-enabled0/#respond Mon, 26 Oct 2026 09:56:58 +0000 https://matoken.org/blog/?p=5759

phpからリモートコード実行の緩和策のおしらせが出ていました。

23 Oct 2026
Informational advisory: Session upload progress

We suggest you set session.upload_progress.enabled=0 until the next regular bugfix release, to fully protect from an unlikely RCE vector. This setting was already listed as a mitigation in the GHSA-6wmf-4rv5-p3rp advisory for CVE-2026-109619 published on Oct 21st, 2026. If you applied it then, keep it in place and no further action is needed.

バグ修正リリースまで session.upload_progress.enabled=0 を設定しておくことがお勧めされています.
この設定はファイルアップロードのプログレス情報の設定のようです.

自環境はどうなっているかなと確認してみます.

phpinfoを用意して呼び出して確認します.

phpinfo.php
<?php echo phpinfo(); ?>

On になっているので有効状態のようです。

$ w3m -dump https://matoken.org/phpinfo.php | grep session.upload_progress.enabled
session.upload_progress.enabled  On                          On

/etc/php/8.2/apache2/php.ini, /etc/php/8.2/fpm/php.ini` を編集します.

@@ -1541,7 +1541,7 @@ session.sid_bits_per_character = 5
 ; Development Value: On
 ; Production Value: On
 ; https://php.net/session.upload-progress.enabled
-;session.upload_progress.enabled = On
+session.upload_progress.enabled = 0

 ; Cleanup the progress information as soon as all POST data has been read
 ; (i.e. upload completed).

デーモンを再起動しておきます.

$ sudo service apache2 restart
$ sudo service php8.2-fpm restart

再度設定を確認すると Off になりました.

$w3m -dump https://matoken.org/phpinfo.php | grep session.upload_progress.enabled
session.upload_progress.enabled  Off                         Off

確認が終わったらphpinfoのファイルは動かなくしておいたほうがいいかもしれません。

$ sudo rm phpinfo.php
$ w3m -dump https://matoken.org/phpinfo.php
Not Found

The requested URL was not found on this server.

━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━

Apache/2.4.68 (Debian) Server at matoken.org Port 443

この状態でWordPress のメディアアップロード、Nextcloud のファイルアップロードを試すとプログレスが動きます。
恐らくWebブラウザ側でのJavaScript実装なのかなと思います(未確認)。

環境
$ dpkg-query -W php apache2
apache2 2.4.68-1~deb12u1
php     2:8.2+93
$ lsb_release -dr
No LSB modules are available.
Description:    Debian GNU/Linux 12 (bookworm)
Release:        12
$ arch
x86_64
Note

この環境はdist-upgrade しておいたほうがいいですね。

追記)Debian trixie amd64の場合

この環境はdist-upgrade しておいたほうがいいですね。

ということでdist-upgradeしました。
すると ession.upload_progress.enabled は既定値が有効なのでまたOnになっています。

$ w3m -dump https://matoken.org/phpinfo.php | grep ession.upload_progress.enabled
session.upload_progress.enabled  On                          On

そこで再度設定変更して,

$ sudo git -C /etc diff HEAD~~ /etc/php/8.4/apache2/php.ini
diff --git a/php/8.4/apache2/php.ini b/php/8.4/apache2/php.ini
index f22ecd1b8..1d231843d 100644
--- a/php/8.4/apache2/php.ini
+++ b/php/8.4/apache2/php.ini
@@ -1445,7 +1445,7 @@ session.trans_sid_tags = "a=href,area=href,frame=src,form="
 ; Development Value: On
 ; Production Value: On
 ; https://php.net/session.upload-progress.enabled
-;session.upload_progress.enabled = On
+session.upload_progress.enabled = 0

 ; Cleanup the progress information as soon as all POST data has been read
 ; (i.e. upload completed).
$ sudo git -C /etc diff HEAD /etc/php/8.4/fpm/php.ini
diff --git a/php/8.4/fpm/php.ini b/php/8.4/fpm/php.ini
index f22ecd1b8..1d231843d 100644
--- a/php/8.4/fpm/php.ini
+++ b/php/8.4/fpm/php.ini
@@ -1445,7 +1445,7 @@ session.trans_sid_tags = "a=href,area=href,frame=src,form="
 ; Development Value: On
 ; Production Value: On
 ; https://php.net/session.upload-progress.enabled
-;session.upload_progress.enabled = On
+session.upload_progress.enabled = 0

 ; Cleanup the progress information as soon as all POST data has been read
 ; (i.e. upload completed).

デーモンを再起動して、

$ sudo service php8.4-fpm restart
$ sudo service apache2 restart

Offになりました。

$ w3m -dump https://matoken.org/phpinfo.php | grep session.upload_progress.enabled
session.upload_progress.enabled  Off                         Off
環境
$ dpkg-query -W php apache2
apache2 2.4.69-1~deb13u1
php     2:8.4+96
$ lsb_release -dr
Description:    Debian GNU/Linux 13 (trixie)
Release:        13
$ arch
x86_64
]]>
https://matoken.org/blog/2026/10/26/session-upload_progress-enabled0/feed/ 0
日本語入力システムのMeltypeを試す https://matoken.org/blog/2026/10/26/try-japanese-input-system-meltype/ https://matoken.org/blog/2026/10/26/try-japanese-input-system-meltype/#respond Sun, 25 Oct 2026 21:19:26 +0000 https://matoken.org/blog/?p=5748

Linux iBus/fcitx5にも対応した日本語入力システムのMeltype を試しはじめました。

MeltypeはLinux, Windows, macOSに対応している日本語入力システムです。半角/全角を自動判別してくれるようです。
Linuxではamd64/arm64アーキテクチャー、iBus/fcitx5に対応しているようです.
ライセンスはGPL-3.0 licenseです。

導入

今回はDebian sid amd64のfcitx5環境に導入しました。
GitHub Releases から現時点での最新の1.3.0のamd64の.deb を使いました。

$ wget -c https://github.com/yksr-melt/Meltype/releases/download/v1.3.0/meltype_1.3.0_amd64.deb
$ sha256sum meltype_1.3.0_amd64.deb
6eec30d93299399ec19f89c73cda0796ad6f08606cc106dec07a4166a3c64862  meltype_1.3.0_amd64.deb
$ vt file 6eec30d93299399ec19f89c73cda0796ad6f08606cc106dec07a4166a3c64862
File "6eec30d93299399ec19f89c73cda0796ad6f08606cc106dec07a4166a3c64862" not found
$ vt scan file ./meltype_1.3.0_amd64.deb --wait
$ vt file 6eec30d93299399ec19f89c73cda0796ad6f08606cc106dec07a4166a3c64862 --format json | jq '.[0].last_analysis_stats'
{
  "confirmed-timeout": 1,
  "failure": 0,
  "harmless": 0,
  "malicious": 0,
  "suspicious": 0,
  "timeout": 0,
  "type-unsupported": 14,
  "undetected": 60
}
$ sudo apt install ./meltype_1.3.0_amd64.deb

パッケージ導入後はfcitx5に登録します. fcitx5-config-qt を起動、

この時点ではfcitx5はMeltype を見つけてくれません。メッセージにあるように「更新」ボタンを押すことで認識しました。

meltype fcitx5 01
meltype fcitx5 02

Meltype を追加して「適用」を押すと使えるようになります。

まだ導入したばかりで使い勝手はまだなんとも言えませんがしばらく試してみようと思います。

環境

$ dpkg-query -W fcitx5* meltype
fcitx5  5.1.23-1
fcitx5-chinese-addons
fcitx5-config-qt        5.1.16-1
fcitx5-configtool
fcitx5-configtool-data
fcitx5-data     5.1.23-1
fcitx5-frontend-all     5.1.23-1
fcitx5-frontend-fbterm
fcitx5-frontend-gtk2
fcitx5-frontend-gtk3    5.1.7-1
fcitx5-frontend-gtk4    5.1.7-1
fcitx5-frontend-qt5     5.1.16-1
fcitx5-frontend-qt6     5.1.16-1
fcitx5-frontend-tmux
fcitx5-module-dbus
fcitx5-module-emoji
fcitx5-module-fcitx4
fcitx5-module-ibus
fcitx5-module-kimpanel
fcitx5-module-quickphrase
fcitx5-module-wayland
fcitx5-module-xorg
fcitx5-modules:amd64    5.1.23-1
fcitx5-mozc:amd64       3.33.6133+ds1-0.2
meltype 1.3.0
$ lsb_release -dr
Description:    Debian GNU/Linux forky/sid
Release:        n/a
$ arch
x86_64
]]>
https://matoken.org/blog/2026/10/26/try-japanese-input-system-meltype/feed/ 0
Debian trixieのGnome環境で時計合わせできていなかった https://matoken.org/blog/2026/10/16/debian-trixie-gnome-ntp/ https://matoken.org/blog/2026/10/16/debian-trixie-gnome-ntp/#respond Fri, 16 Oct 2026 11:44:25 +0000 https://matoken.org/blog/?p=5738

持ち運び端末にPanasonicのCF-RZ6というLaptopを利用しています.2017年1月発売の端末で結構古くバッテリーも弱っていますが,液晶が回転してタブレットとしても使え,1kgほどで軽量,トリガーケーブルを使いモバイルバッテリーから給電できて結構便利に使えています.

OSは慣れているDebianで,外出先でトラブルになると面倒なのでstableのtrixieかつデスクトップもGnomeという標準的な環境にしています.

先日時計が結構ずれているのに気づきました.通常はntpか何かでネットワーク経由で時計合わせをしてくれると思うのですが設定項目が見当たりません.

NICTのJST clockを見るとこんな感じで5分以上ずれています.

debian trixie ntp01

GUIで設定できたはずと設定を探すも見当たりません.近そうな「自動タイムゾーン設定」を有効にしてみましたがやはり関係無いようで数日経っても変わりません.

debian trixie ntp02

GUIは一旦置いておいてターミナルに降ります.timedatectlを見るとこんな感じで System clock synchronized: no となっています.

$ timedatectl
               Local time: Fri 2026-10-16 18:28:14 JST
           Universal time: Fri 2026-10-16 09:28:14 UTC
                 RTC time: Fri 2026-10-16 09:28:15
                Time zone: Asia/Tokyo (JST, +0900)
System clock synchronized: no
              NTP service: n/a
          RTC in local TZ: no

ntpを有効にしようとするとNTPが設定できません.

$ sudo timedatectl set-ntp true
Failed to set ntp: NTP not supported

systemd-timesyncd が必要そうですが入っていません.手動で導入します.

$ dpkg -l | grep systemd-timesyncd
ic  systemd-timesyncd                                        257.8-1~deb13u2                             amd64        minimalistic service to synchronize local time with NTP servers
$ sudo apt install systemd-timesyncd

有効になりました.

$ timedatectl
               Local time: Fri 2026-10-16 18:32:41 JST
           Universal time: Fri 2026-10-16 09:32:41 UTC
                 RTC time: Fri 2026-10-16 09:32:41
                Time zone: Asia/Tokyo (JST, +0900)
System clock synchronized: yes
              NTP service: active
          RTC in local TZ: no

この状態で再度設定画面を見ると,勝手に画面が更新されて「自動日時設定」という設定項目が増えています.

debian trixie ntp03

JST clockページを見ると一気に時間が飛んでいます.時計が戻っているのでログなんかはおかしくなってしまっている可能性がありますね…….この辺を気にするならntpdやchronyにしたほうが良いのかもしれません.

debian trixie ntp04

ntp serverは *.debian.pool.ntp.org を見に行ってると思います.

$ timedatectl timesync-status | grep Server
       Server: 162.159.200.1 (0.debian.pool.ntp.org)

このあたりを変更したい場合は /etc/systemd/timesyncd.conf で変更できると思います.ISPや近所,NICTなんかにしておいてもいいかもしれません.
が,この端末はあちこちの回線で使うのでこのままでいいかな?

$ grep NTP /etc/systemd/timesyncd.conf
#NTP=
#FallbackNTP=0.debian.pool.ntp.org 1.debian.pool.ntp.org 2.debian.pool.ntp.org 3.debian.pool.ntp.org

Laptop情報

$ cat /sys/class/dmi/id/sys_vendor
Panasonic Corporation
$ cat /sys/class/dmi/id/product_name
CFRZ6-2
$ grep -m1 model\ name /proc/cpuinfo
model name      : Intel(R) Core(TM) i5-7Y57 CPU @ 1.20GHz
$ free -h
               total        used        free      shared  buff/cache   available
Mem:           7.7Gi       4.1Gi       665Mi       1.0Gi       4.0Gi       3.6Gi
Swap:          7.9Gi       3.9Gi       4.0Gi

バッテリーはもうほとんど売っていないし高価になっているのでモバイルバッテリーをトリガーケーブル経由で利用している.

モバイルバッテリーはINIU BI-B62という2000mAh/45W出力のものを利用している.この製品は現在Amazon商品ページはなくなっているよう.スペック的には以下のあたりが近い?

少し高く重くなるけど以下のあたりも良さそう.25000mAh, 100W出力.

トリガーケーブルというかアダプタはこちらの15V, 5.5mmx2.5mmmのものを利用.このLaptopのACアダプタは16Vだが15Vでも使えている.ケーブルはダイソーの60W対応の安いものを利用.

]]>
https://matoken.org/blog/2026/10/16/debian-trixie-gnome-ntp/feed/ 0
scrcpy 5.0でハードウェアデコードに対応 https://matoken.org/blog/2026/10/06/scrcpy-5-0_hardware-decode/ https://matoken.org/blog/2026/10/06/scrcpy-5-0_hardware-decode/#respond Tue, 06 Oct 2026 10:56:42 +0000 https://matoken.org/blog/?p=5722

Android端末をUSBや無線経由で画面表示や操作のできるScrcpyの5.0がリリースされました.

今回のハイライトはハードウェアデコード機能の追加.

laptopを省電力モードにしている状態で動画再生中のAndroidを画面転送していると再生が追いつかずどんどん映像と音がずれていたのですがハードウェアデコードが使えるとこういったことが減りそうです.

Debian packageのscrcpyは結構古いです.

$ rmadison scrcpy
scrcpy     | 1.17-1          | oldoldstable                             | source, amd64, arm64, armhf, i386
scrcpy     | 3.3.4-1~bpo12+1 | oldstable-backports-sloppy-debug/contrib | source
scrcpy     | 3.3.4-1~bpo12+1 | oldstable-backports-sloppy/contrib       | source, amd64, arm64, armel, armhf, i386, mips64el, mipsel, ppc64el, s390x
scrcpy     | 3.3.4-1~bpo13+1 | stable-backports-debug/contrib           | source
scrcpy     | 3.3.4-1~bpo13+1 | stable-backports/contrib                 | source, amd64, arm64, armel, armhf, i386, ppc64el, riscv64, s390x
scrcpy     | 4.1-1           | testing/contrib                          | source
scrcpy     | 4.1-1           | unstable-debug/contrib                   | source
scrcpy     | 4.1-1           | unstable/contrib                         | source
scrcpy     | 4.1-1+b1        | testing/contrib                          | amd64, arm64, armhf, i386, loong64, ppc64el, riscv64, s390x
scrcpy     | 4.1-1+b1        | unstable/contrib                         | amd64, arm64, armhf, i386, loong64, ppc64el, riscv64, s390x

scrcpyのsourceをpullして5.0で

$ git pull
$ git checkout v5.0
HEAD is now at 19871982 Update links to 5.0
$ git status
HEAD detached at v5.0
nothing to commit, working tree clean

buildは大変なので既製のサーバーを使用します.

$ ./install_release.sh

5.0になりました.

$ which scrcpy
/usr/local/bin/scrcpy
$ scrcpy --version
scrcpy 5.0 <https://github.com/Genymobile/scrcpy>

Dependencies (compiled / linked):
 - SDL: 3.4.16 / 3.4.16
 - libavcodec: 63.1.102 / 63.1.102
 - libavformat: 63.1.102 / 63.1.102
 - libavutil: 61.1.102 / 61.1.102
 - libavdevice: 63.1.102 / 63.1.102
 - libusb: - / 1.0.30

--hwdec オプションもあります.

$ scrcpy --help | grep -A7 -- --hwdec=
    --hwdec=mode
        Configure hardware video decoding on the computer.
        Possible values are "auto" (the first available hardware decoder,
        software decoding otherwise), "disabled" (always use software decoding),
        "vaapi" (Linux only), "d3d11va" (Windows only) and "videotoolbox" (macOS
        only).
        Default is "auto".

既定値では --hwdec=auto で vaapi になりました.

$ scrcpy
scrcpy 5.0 <https://github.com/Genymobile/scrcpy>
INFO: ADB device found:
INFO:     -->   (usb)  cfc15fe5                        device  P780
/usr/local/share/scrcpy/scrcpy-server: 1 file pushed, 0 skipped. 43.9 MB/s (733974 bytes in 0.016s)
[server] INFO: Device: [TINNO] Rakuten P780 (Android 11)
INFO: Renderer: opengl
INFO: OpenGL version: 4.6 (Compatibility Profile) Mesa 26.2.4-1
INFO: Trilinear filtering enabled
INFO: Trilinear filtering disabled for VA-API frames
INFO: Interop: vaapi
INFO: Video decoding: vaapi
INFO: Texture (VA-API): 720x1520

VA-APIで対応しているハードウェアデコードのコーデックは vainfo コマンドなどで確認できます.

$ vainfo
Trying display: wayland
Trying display: x11
libva info: VA-API version 1.24.0
libva info: Trying to open /usr/lib/x86_64-linux-gnu/dri/iHD_drv_video.so
libva info: Found init function __vaDriverInit_1_24
libva info: va_openDriver() returns 0
vainfo: VA-API version: 1.24 (libva 2.23.0)
vainfo: Driver version: Intel iHD driver for Intel(R) Gen Graphics - 26.2.4 ()
vainfo: Supported profile and entrypoints
      VAProfileMPEG2Simple            :	VAEntrypointVLD
      VAProfileMPEG2Main              :	VAEntrypointVLD
      VAProfileH264Main               :	VAEntrypointVLD
      VAProfileH264Main               :	VAEntrypointEncSliceLP
      VAProfileH264High               :	VAEntrypointVLD
      VAProfileH264High               :	VAEntrypointEncSliceLP
      VAProfileJPEGBaseline           :	VAEntrypointVLD
      VAProfileJPEGBaseline           :	VAEntrypointEncPicture
      VAProfileH264ConstrainedBaseline:	VAEntrypointVLD
      VAProfileH264ConstrainedBaseline:	VAEntrypointEncSliceLP
      VAProfileVP8Version0_3          :	VAEntrypointVLD
      VAProfileHEVCMain               :	VAEntrypointVLD
      VAProfileHEVCMain10             :	VAEntrypointVLD
      VAProfileVP9Profile0            :	VAEntrypointVLD
      VAProfileVP9Profile2            :	VAEntrypointVLD

Android側は scrcpy --list-encoders で確認できます.
恐らく(hw)となっているところがハードウェアエンコード.このPCとAndroidの組み合わせだとH.264かH.265になりそうです.

$ scrcpy --list-encoders
scrcpy 5.0 <https://github.com/Genymobile/scrcpy>
INFO: ADB device found:
INFO:     -->   (usb)  cfc15fe5                        device  P780
/usr/local/share/scrcpy/scrcpy-server: 1 file pushed, 0 skipped. 71.2 MB/s (733974 bytes in 0.010s)
[server] INFO: Device: [TINNO] Rakuten P780 (Android 11)
[server] INFO: List of video encoders:
    --video-codec=h264 --video-encoder=c2.qti.avc.encoder             (hw) [vendor]
    --video-codec=h264 --video-encoder=OMX.qcom.video.encoder.avc     (hw) [vendor] (alias for c2.qti.avc.encoder)
    --video-codec=h264 --video-encoder=c2.android.avc.encoder         (sw)
    --video-codec=h264 --video-encoder=OMX.google.h264.encoder        (sw) (alias for c2.android.avc.encoder)
    --video-codec=h265 --video-encoder=c2.qti.hevc.encoder            (hw) [vendor]
    --video-codec=h265 --video-encoder=OMX.qcom.video.encoder.hevc    (hw) [vendor] (alias for c2.qti.hevc.encoder)
    --video-codec=h265 --video-encoder=c2.qti.hevc.encoder.cq         (hw) [vendor]
    --video-codec=h265 --video-encoder=OMX.qcom.video.encoder.hevc.cq (hw) [vendor] (alias for c2.qti.hevc.encoder.cq)
    --video-codec=h265 --video-encoder=c2.android.hevc.encoder        (sw)
    --video-codec=vp8 --video-encoder=c2.android.vp8.encoder          (sw)
    --video-codec=vp8 --video-encoder=OMX.google.vp8.encoder          (sw) (alias for c2.android.vp8.encoder)
    --video-codec=vp9 --video-encoder=c2.android.vp9.encoder          (sw)
    --video-codec=vp9 --video-encoder=OMX.google.vp9.encoder          (sw) (alias for c2.android.vp9.encoder)
[server] INFO: List of audio encoders:
    --audio-codec=opus --audio-encoder=c2.android.opus.encoder        (sw)
    --audio-codec=aac --audio-encoder=c2.android.aac.encoder          (sw)
    --audio-codec=aac --audio-encoder=OMX.google.aac.encoder          (sw) (alias for c2.android.aac.encoder)
    --audio-codec=flac --audio-encoder=c2.android.flac.encoder        (sw)
    --audio-codec=flac --audio-encoder=OMX.google.flac.encoder        (sw) (alias for c2.android.flac.encoder)

laptopを省電力モードにして動画再生中のAndroidの画面を転送してみると遅れもなくなったようです.
ということて低スペックマシンなどで遅いと思っていた方なんかには嬉しい変更です.

Note

F-Droidで見かけたのですが,Android → Android の画面転送のできるAndroid版scrcpyもありました.(未検証)

]]>
https://matoken.org/blog/2026/10/06/scrcpy-5-0_hardware-decode/feed/ 0
OpenCloud 8.0.0のリアルタイム共同編集機能を試す https://matoken.org/blog/2026/10/05/opencloud-8-0-0-real-time-collaborative-editing/ https://matoken.org/blog/2026/10/05/opencloud-8-0-0-real-time-collaborative-editing/#comments Mon, 05 Oct 2026 10:31:49 +0000 https://matoken.org/blog/?p=5713

OpenCloud 8.0.0で標準テキストエディターでのリアルタイム共同編集機能が入りました.

Highlights
📝 Real-time collaborative editing in the Editor

Several people can now edit the same Markdown or .ocnote file at the same time. Everyone sees every keystroke immediately, without locking and without waiting for a save.

シングルバイナリで試そうとしましたが単体ではこの機能は動作せず,別途YJS Serverが必要で動作しませんでした.

YJSの含まれたDocker composeが用意されているので今回これで試してみました.

OpenCloudをDocker composeで起動

まずはcompose fileのリポジトリをclone

$ git clone https://github.com/opencloud-eu/opencloud-compose
$ cd opencloud-compose

.env を用意.

$ cp  .env.example .env (1)
$ editor .env (2)
  1. .env.example をもとに .env を用意

  2. .env を編集

$ diff .env.example .env
13c13
< #COMPOSE_FILE=docker-compose.yml:yjs/yjs.yml:traefik/opencloud.yml
---
> COMPOSE_FILE=docker-compose.yml:yjs/yjs.yml:traefik/opencloud.yml (1)
82,83c82,83
< #TRAEFIK_PORT_HTTP=4080
< #TRAEFIK_PORT_HTTPS=4443
---
> TRAEFIK_PORT_HTTP=4080
> TRAEFIK_PORT_HTTPS=4443 (2)
114c114
< INITIAL_ADMIN_PASSWORD=
---
> INITIAL_ADMIN_PASSWORD=SicVeftijLafJav~ (3)
  1. YJSを使えるように

  2. ポートがすでに利用されているので別のポートに変更

  3. 適当な初期パスワードを設定

/etc/hostsを編集してテスト用のドメインを設定.

$ sudo git -C /etc diff /etc/hosts
diff --git a/hosts b/hosts
index 4ec7947..d81d0c6 100644
--- a/hosts
+++ b/hosts
@@ -1,6 +1,8 @@
 127.0.0.1      localhost
 127.0.1.1      tp-l13.home.matoken.org tp-l13
+127.0.0.1      cloud.opencloud.test
+127.0.0.1      traefik.opencloud.test
+127.0.0.1      keycloak.opencloud.test

 # The following lines are desirable for IPv6 capable hosts
 ::1     localhost ip6-localhost ip6-loopback

OpenCloudを起動.

$ docker compose up

https://cloud.opencloud.test:4443/ にアクセスするとOpenCloudに接続されます.

共同編集を試す

共同編集を試すためにMarkdown若しくは.ocnoteのファイルを用意します.
このファイルを共有します.
少し試した感じではURL共有だと共同編集は有効にならないようです.
ユーザーを複数用意して他のユーザーに編集権を付けて共有することで共同編集ができるようになりました.

opencloud file share

共同変種画面はこんな感じです.ユーザーのカーソル位置が共有され,編集も相互にリアルタイムに反映されます.
ただし,Etherpadと違いこの行は誰が編集したかなどはわからないようです.

opencloud collaborative editing

ということで,リアルタイム共同編集は動作するように出来ました.しかし現時点ではOpenCloudアカウントが必要で現在Etherpadでパスワード無しで共同編集をしているものの置き換えには難しいかなという感じ.
リリースされたばかりなのでこれからに期待です.

opencloud 8.0.1
]]>
https://matoken.org/blog/2026/10/05/opencloud-8-0-0-real-time-collaborative-editing/feed/ 1
OpenCloud 8.0.0のシングルバイナリがなかなか動かせなかった https://matoken.org/blog/2026/10/05/opencloud-8-0-0_single-binary/ https://matoken.org/blog/2026/10/05/opencloud-8-0-0_single-binary/#comments Sun, 04 Oct 2026 21:25:10 +0000 https://matoken.org/blog/?p=5700

先日OpenCloud 8.0.0がリリースされました.
ハイライトにリアルタイムコラボレーション編集機能がエディター機能に実装されたとのことでMarkdownや.ocnote形式のファイルが複数人でリアルタイム編集できるようになったようです.

Highlights
📝 Real-time collaborative editing in the Editor

Etherpadと同じようなものかもしれないと久々にOpenCloudを動かしてみたら数カ所嵌ったのでメモしておきます.

OpenCloudはGo言語で書き直されているownCloud Infinite Scale(oCIS)のフォークです.PHPベースのownCloudやNextcloudに比べて軽量と言われています.

ハードウェア要件を見ると10人くらいまでの最低要件でこんな感じでRaspberry Pi 3でも大丈夫みたいです.GitHub releasesのバイナリにはamd64やarm64なんかの他にもレガシーなi386やarm(32bit)もあります.

Minimum (Minimal bare-metal Deployment – Up to 10 Users)

  • eg. Raspberry Pi 3
  • 1 GHz (Single-core)
  • 512 MB Ram
  • Storage: depends on data usage

OpenCloudシングルバイナリの導入

導入はDockerがありますが,GitHub Releasesのリングルバイナリを利用するのがおてがるそうです.以前もそれで試していたので今回もこれを使うことに.

$ wget -c https://github.com/opencloud-eu/opencloud/releases/download/v8.0.1/opencloud-8.0.1-linux-amd64 \
          https://github.com/opencloud-eu/opencloud/releases/download/v8.0.1/opencloud-8.0.1-linux-amd64.sha256
$ sha256sum --check opencloud-8.0.1-linux-amd64.sha256
opencloud-8.0.1-linux-amd64: OK
$ chmod u+x opencloud-8.0.1-linux-amd64

以前試していた設定があるので設定のdiffを確認します.

$ ./opencloud-8.0.1-linux-amd64 init --diff
Do you want to configure OpenCloud with certificate checking disabled?
 This is not recommended for public instances! [yes | no = default]
running in diff mode
diff -u /home/matoken/.opencloud/config/opencloud.yaml /home/matoken/.opencloud/config/opencloud.yaml.tmp

  :

差分が多いしテストでしか使ってなかったので --force-overwrite で設定を上書きすることにします.

$ ./opencloud-8.0.1-linux-amd64 init --force-overwrite

OpenCloud serverが起動しない?

これで起動しようとするとコケます.

$ ./opencloud-8.0.1-linux-amd64 server
panic: runtime error: invalid memory address or nil pointer dereference
[signal SIGSEGV: segmentation violation code=0x1 addr=0x1b0 pc=0x7f404a03b157]

Linux armhf環境だと起動します.
リリースから数日経ってもIssueにも上がっていないし自分の環境だけそうです.

なんだろうと思いながら何度か実行するとタイミングによりメッセージが変わります.

{"level":"error","service":"opencloud","event":"opencloud: Failed service 'sharing' (1.000000 failures of 5.000000), restarting: true, error: listen tcp 127.0.0.1:9150: bind: address already in use","service":"sharing","supervisor":"opencloud","restarting":true,"failures":1,"threshold":5,"error":"listen tcp 127.0.0.1:9150: bind: address already in use","time":"2026-09-16T06:17:45+09:00","message":"service terminated"}
{"level":"error","service":"opencloud","event":"opencloud: Failed service 'sharing' (1.629878 failures of 5.000000), restarting: true, error: listen tcp 127.0.0.1:9150: bind: address already in use","service":"sharing","supervisor":"opencloud","restarting":true,"failures":1.6298778555015767,"threshold":5,"error":"listen tcp 127.0.0.1:9150: bind: address already in use","time":"2026-09-16T06:18:05+09:00","message":"service terminated"}
panic: runtime error: invalid memory address or nil pointer dereference
[signal SIGSEGV: segmentation violation code=0x1 addr=0x1b0 pc=0x7f843683b157]

tcp 9150が当たっていそう.torがすでに使っているようです.

$ sudo ss -ltnp 'sport = :9150'
State                 Recv-Q                Send-Q                               Local Address:Port                               Peer Address:Port               Process
LISTEN                0                     4096                                     127.0.0.1:9150                                    0.0.0.0:*                   users:(("tor",pid=3949956,fd=11))
$ sudo service tor stop

やっぱり駄目です.

$ pstree -Aps 3949956
systemd(1)---firefox.real(3948785)---tor(3949956)-+-lyrebird(3950548)-+-{lyrebird}(3950549)
                                                  |                   |-{lyrebird}(3950550)
                                                  |                   |-{lyrebird}(3950551)
                                                  |                   |-{lyrebird}(3950552)
                                                  |                   |-{lyrebird}(3950553)
                                                  |                   |-{lyrebird}(3950554)
                                                  |                   |-{lyrebird}(3950555)
                                                  |                   |-{lyrebird}(3950650)
                                                  |                   |-{lyrebird}(3950651)
                                                  |                   |-{lyrebird}(3950652)
                                                  |                   |-{lyrebird}(3950653)
                                                  |                   |-{lyrebird}(3950654)
                                                  |                   |-{lyrebird}(3950655)
                                                  |                   |-{lyrebird}(3950656)
                                                  |                   |-{lyrebird}(3950657)
                                                  |                   |-{lyrebird}(3950658)
                                                  |                   |-{lyrebird}(3950659)
                                                  |                   |-{lyrebird}(3950660)
                                                  |                   |-{lyrebird}(3950661)
                                                  |                   `-{lyrebird}(625816)
                                                  |-{tor}(3950480)
                                                  |-{tor}(3950481)
                                                  |-{tor}(3950482)
                                                  |-{tor}(3950483)
                                                  |-{tor}(3950484)
                                                  |-{tor}(3950485)
                                                  |-{tor}(3950486)
                                                  `-{tor}(3950487)

tor daemonではなくTor Browserのtorが当たっていたようでTor Browserを終了するとOpenCloudが起動するようになりました.

OpenCloud側のポートの変更方法はよくわからないしTor Browserの方の設定変更も about:config をいじらないといけないようです.とりあえずTor Browserを停止してOpenCloudを試すことにします.

OpenCloud ログイン画面で500エラー

OpenCloud Serverを起動します.

$ ./opencloud-8.0.1-linux-amd64 server

これでOpenCloudを起動した状態でウェブブラウザで https://localhost:9200/ に接続するとログイン画面になりますが,ログイン画面で500エラーになります.

opencloud login ng

関連しそうなIssueがありました.
すでにOpenCloudを動かしたことがある状態で設定を上書き(init –force-overwrite)するとこういったことが起こるようです.
OpenCloudディレクトリごと一旦削除してからinitを動かすといいようです.OpenCloudのディレクトリは既定値では ~/.opencloud です.このディレクトリごと消してからinitを叩くと動くようになりました.

$ rm -rf ~/.opencloud
$ ./opencloud-8.0.1-linux-amd64 init
$ ./opencloud-8.0.1-linux-amd64 server
    :

ログイン画面( https://localhost:9200/ )でUsername「admin」, Password「(init時に表示)」でログインします.これでOpenCloudが利用できるようになりました.

opencloud login
pencloud file01
opencloud upmenu

テキストエディタ共同編集機能

OpenCloud 8.0.0からの共同編集機能を試そうと,Markdownや.ocnoteを共有して複数のユーザ,複数のウェブブラウザで試してみたが,それぞれ編集は可能なのですが,lockもなく最後に編集したものが反映される動作です.
Dockerだと動くようなので何かが足りないようです.

少し調べると共同編集機能にはYjsというJavaScript製のCRDT(Conflict-free Replicated Data Type)ライブラリが必要らしいです.

シングルバイナリのOpenCloudにはYjsは含まれておらず別途Yjsを用意して起動する必要があるようです.
DockerだとYjsは同梱されていてすぐ動かせるようです.

ということで今回は一旦ここまで.
以前はさくっとと動かせましたが今回はポートが競合したり,古い設定が悪さをしたりライブラリが足りなかったりとDockerで動かせば引っかからずに動いたんだろうなという感じでした.

]]>
https://matoken.org/blog/2026/10/05/opencloud-8-0-0_single-binary/feed/ 1
画像対応TUI RSSリーダーのeilmeldungをアップデートしたらクラッシュ https://matoken.org/blog/2026/10/04/eilmeldung-crash/ https://matoken.org/blog/2026/10/04/eilmeldung-crash/#comments Sat, 03 Oct 2026 22:47:13 +0000 https://matoken.org/blog/?p=5674

eilmeldungという画像対応TUI RSSリーダーをサブで使っています.

1.9.0がリリースされたので更新したら動かなくなりました.

$ eilmeldung
Error: expecting article search query: invalid token: % for key `input_config.mappings.O[1]`

Location:
    src/config/config_file_manager.rs:97:27

ISSUEを探すと同じようなものがありました.

設定に互換性のない変更があったようでそのせいで動かなくなっているよう.
移行ガイドを書いたよということでこちらを参考に.

今回の1.9.0での変更でmouse_supportがあるのでこれを設定から消してみましたが駄目.他のところでコケていそうです.
ということで,以降ガイドの以下のメッセージに従い,一旦設定を空にして起動するのを確認.その後自分の書いた設定だけを持ってきて解決しました.

IMPORTANT: Don't copy example/default-config.toml. Start with an empty config.toml and just add the settings you want to be different from the default-config.toml! default-config.toml is for reference purposes only and is prone to break if used directly.

現在の設定はこれだけです.

~/.config/eilmeldung/config.toml
startup_commands = ["expandcategories all", "sync"]
eilmeldung crash
]]>
https://matoken.org/blog/2026/10/04/eilmeldung-crash/feed/ 1
infiniCLOUDでWebDav接続して暗号化ファイルバックアップ https://matoken.org/blog/2026/10/04/infinicloud-encrypted-backup/ https://matoken.org/blog/2026/10/04/infinicloud-encrypted-backup/#respond Sat, 03 Oct 2026 22:25:13 +0000 https://matoken.org/blog/?p=5665

【LCTZ5】登録後にマイページでこの紹介コードを入力すると、今なら5GBプレゼント!国産クラウドストレージ「infiniCLOUD」

てことでWebDav使えるとこを探して試しに登録してみました.
infiniCLOUDは無料で20GB+紹介コード入力で+5GBの国内クラドサービスです.

登録してWebDav接続して,gocryptfsのreverse mountを使い暗号化バックアップまで試してみました.

infiniCLOUDは現在すぐに登録出来ません.一旦仮登録して順番待ちに入り,そこから待ちが解消されたらメールで連絡が来て本登録となっています.
今回は仮登録から本登録まで7日ほどかかりました.

本登録時には無料で20GB利用できます.ここで「マイページ」の「紹介ボーナス情報」→「紹介コードを入力する」で紹介コードを入力すると容量が5GB追加されます.

紹介コードは私のコードを使ってもらえるなら「LCTZ5」を入力してください.若しくはWeb検索やSNS検索でもたくさん出てきます.

WebDav接続

infiniCLOUDはWebDavに対応していますが標準では利用できません.マイページで有効にする必要があります.

マイページに移動し,「外部アプリ接続」→「外部アプリ接続を許可する」にチェックすると,「アプリパスワード」が払い出されます.このパスワードをメモしておきます.

infiniCLOUD dav01

この後,WebDav clientで httpss://higa.teracloud.jp/dav に「接続ID」と「アプリパスワード」で接続できるようになります.
ファイラーのNautilusやPC-ManFM-qtでは davs://higa.teracloud.jp/dav で接続できます.

infiniCLOUD PC ManFM01

gocryptfsのreverse modeで暗号化backup

WebDavでファイルを転送してみます.でも以下のような話もあるし事業者側でチェックできないよう暗号化してから転送することにします.

この記事ではCryptomatorやRcloneが紹介されています.ここではgocryptfsのreverse modeで任意のディレクトリを暗号化マウントして暗号されたディレクトリ以下を転送してみます.

Tip

以下はコマンドでゴニョゴニョやっていますが,Cryptomatorは基本GUIですし,gocryptfs対応のGUIアプリもあります.

Note

以前Cryptomatorを試して「鹿児島Linux勉強会 2021.09」で発表した資料.

今回は以下のようなディレクトリ構成です.

  • バックアップ対象ディレクトリ(平文)を ~/backup

  • reverse modeでリバースマウントした暗号化されたディレクトリを ~/fuse/crypt

  • infiniCLOUDのWebDavのマウントポイントを ~/fuse/WebDav

先ずはreverse modeの初期化を行います.これは初回のみ必要です.
パスワードを求められます.ある程度複雑で長いパスワードを指定します.このパスワードを紛失するとデータは失われます.

初期化(初回のみ)
$ gocryptfs -reverse -init ~/backup
Choose a password for protecting your files.
Password:
Repeat:

Your master key is:

    eb790dfd-6ef73a50-479c61a2-4241ad29-
    d7fca680-e2b285ed-8f8d253d-4de67707

If the gocryptfs.conf file becomes corrupted or you ever forget your password,
there is only one hope for recovery: The master key. Print it to a piece of
paper and store it in a drawer. This message is only printed once.
The gocryptfs-reverse filesystem has been created successfully.
You can now mount it using: gocryptfs -reverse . MOUNTPOINT
設定ファイルが作られている
$ ls -A ~/backup/.gocryptfs.reverse.conf
/home/matoken/backup/.gocryptfs.reverse.conf
$ cat ~/backup/.gocryptfs.reverse.conf
{
        "Creator": "gocryptfs 2.6.1",
        "EncryptedKey": "tDNot8rK0TgXqbeailSl1ivc6BtfJadyruGrT6jH+MTz9w0kiwc7GeetpZlg+XuZkmgbR+IgxCLVjZmneCSLVQ==",
        "ScryptObject": {
                "Salt": "Ua4Sh5RA8XSws5HPfP2nZngtu9MDtXdlPU+3GsZ07qM=",
                "N": 65536,
                "R": 8,
                "P": 1,
                "KeyLen": 32
        },
        "Version": 2,
        "FeatureFlags": [
                "HKDF",
                "GCMIV128",
                "DirIV",
                "EMENames",
                "LongNames",
                "Raw64",
                "AESSIV"
        ]
}
gocryptfsのreverse modeでマウント
$ gocryptfs -reverse ~/backup ~/fuse/crypt
Password:
Decrypting master key
Filesystem mounted and ready.
$ ls -A ~/fuse/crypt
BRR2b2p5T-5OJ6Z5sGNF3Q  gocryptfs.conf  gocryptfs.diriv
$ cat ~/fuse/crypt/gocryptfs.conf
{
        "Creator": "gocryptfs 2.6.1",
        "EncryptedKey": "tDNot8rK0TgXqbeailSl1ivc6BtfJadyruGrT6jH+MTz9w0kiwc7GeetpZlg+XuZkmgbR+IgxCLVjZmneCSLVQ==",
        "ScryptObject": {
                "Salt": "Ua4Sh5RA8XSws5HPfP2nZngtu9MDtXdlPU+3GsZ07qM=",
                "N": 65536,
                "R": 8,
                "P": 1,
                "KeyLen": 32
        },
        "Version": 2,
        "FeatureFlags": [
                "HKDF",
                "GCMIV128",
                "DirIV",
                "EMENames",
                "LongNames",
                "Raw64",
                "AESSIV"
        ]
}
rsyncコマンドでファイル転送.
$ rsync -avcP ~/fuse/crypt ~/fuse/WebDav/
mountして復号できるか確認
$ gocryptfs ~/fuse/crypt ~/fuse/decrypt
Password:
Decrypting master key
Filesystem mounted and ready.
$ ls ~/fuse/decrypt
  :
アンマウント
$ fusermount3 -u ~/fuse/decrypt/
$ fusermount3 -u ~/fuse/crypt/

という感じで自分のデータを暗号化してWebDav経由でinfiniCLOUDに転送して復号化までできることを確認しました.

同じデータを複数人で使いたい場合はNextcloudなどでE2EEなどを使うのが良さそうですが,自分だけで使う分にはこれで十分かなと.

]]>
https://matoken.org/blog/2026/10/04/infinicloud-encrypted-backup/feed/ 0
LaptopのCPU設定をtlpで変更して温度を下げる https://matoken.org/blog/2026/09/02/change-laptop-cpu-settings-with-tlp-to-lower-temperature/ https://matoken.org/blog/2026/09/02/change-laptop-cpu-settings-with-tlp-to-lower-temperature/#comments Tue, 01 Sep 2026 21:00:00 +0000 https://matoken.org/blog/?p=5655

最近暑いのもありPCがシャットダウンしてしまうことが多いです.
シャットダウンしていてログを見ると

kernel: thermal thermal_zone0: acpitz: critical temperature reached
kernel: reboot: HARDWARE PROTECTION shutdown (Temperature too high)

が残されている感じ.
tlpでCPUの設定を変更してみました.

このcritical temperatureはこの端末では100℃のようです.
通常時の温度は75度くらい.

$ sensors | grep coretemp-isa-0000 -A7
coretemp-isa-0000
Adapter: ISA adapter
Package id 0:  +52.0���C  (high = +100.0���C, crit = +100.0���C)
Core 0:        +50.0���C  (high = +100.0���C, crit = +100.0���C)
Core 1:        +52.0���C  (high = +100.0���C, crit = +100.0���C)
Core 2:        +52.0���C  (high = +100.0���C, crit = +100.0���C)
Core 3:        +49.0���C  (high = +100.0���C, crit = +100.0���C)

ということでいまこの端末ではtlpを導入しているのでtlpのcpuの設定を変えて見ようと思います.
設定ファイルは /etc/tlp.conf

CPU_SCALING_GOVERNOR_ON_AC/BAT/SAV

先ずは CPU_SCALING_GOVERNOR_ON_AC/BAT/SAV を設定.既定値は performance になっていそうです.
設定可能な項目は環境によって変わるので, tlp-stat -p などで確認します.この端末だと performance, powersave が設定できそうなので powersave に.

設定可能なscaling governor設定項目を確認
$ sudo tlp-stat -p | grep scaling_available_governors
/sys/devices/system/cpu/cpu0/cpufreq/scaling_available_governors = performance powersave
tlp.confを修正
-#CPU_SCALING_GOVERNOR_ON_AC=performance
-#CPU_SCALING_GOVERNOR_ON_BAT=powersave
-#CPU_SCALING_GOVERNOR_ON_SAV=powersave
+CPU_SCALING_GOVERNOR_ON_AC=powersave
+CPU_SCALING_GOVERNOR_ON_BAT=powersave
+CPU_SCALING_GOVERNOR_ON_SAV=powersave

設定変更したらtmpを再起動します. sudo service tlp restart
少し下がった気がするけどしばらく使っているとまたおこりました.

CPU_ENERGY_PERF_POLICY_ON_AC/BAT/SAV

次は CPU_ENERGY_PERF_POLICY_ON_AC/BAT/SAV を設定してみます.
こちらは power が一番低いようなので balance_performance から power へ変更.

設定可能なcpu energy performance設定項目を確認
$ sudo tlp-stat -p | grep energy_performance_available_preferences
/sys/devices/system/cpu/cpu0/cpufreq/energy_performance_available_preferences = default performance balance_performance balance_power power
tlp.confを修正
-#CPU_ENERGY_PERF_POLICY_ON_AC=balance_performance
-#CPU_ENERGY_PERF_POLICY_ON_BAT=balance_power
-#CPU_ENERGY_PERF_POLICY_ON_SAV=power
+CPU_ENERGY_PERF_POLICY_ON_AC=power
+CPU_ENERGY_PERF_POLICY_ON_BAT=power
+CPU_ENERGY_PERF_POLICY_ON_SAV=power

設定変更したらtmpを再起動します. sudo service tlp restart
少し下がった気がするけどしばらく使っているとまたおこりました.

CPU_BOOST_ON_AC/BAT/SAV

次に CPU_BOOST_ON_AC/BAT/SAV を設定してみます.
これはCPUのturbo boostを有効/無効にする設定のようで,設定項目は 0(off)/1(on) のみのようです.

tlp.confを修正
-#CPU_BOOST_ON_AC=1
-#CPU_BOOST_ON_BAT=1
-#CPU_BOOST_ON_SAV=0
+CPU_BOOST_ON_AC=0
+CPU_BOOST_ON_BAT=0
+CPU_BOOST_ON_SAV=0

設定変更したらtmpを再起動します. sudo service tlp restart

この設定が一番効いたようで一気に温度が下がりました.上2つでは数度ずつしか下がりませんでしたが,この設定で一気に20度近く下がり,現在51℃.
ただ,PCがもたつくことが増えました.

この時点でのtlp-stat -p
$ sudo tlp-stat -p
--- TLP 1.10.2 --------------------------------------------

+++ Processor
CPU model = Intel(R) Core(TM) i7-10510U CPU @ 1.80GHz

/sys/devices/system/cpu/cpu0/cpufreq/scaling_driver    = intel_pstate
/sys/devices/system/cpu/cpu0/cpufreq/scaling_governor  = powersave
/sys/devices/system/cpu/cpu0/cpufreq/scaling_available_governors = performance powersave
/sys/devices/system/cpu/cpu0/cpufreq/scaling_min_freq  =   400000 [kHz]
/sys/devices/system/cpu/cpu0/cpufreq/scaling_max_freq  =  1800000 [kHz]
/sys/devices/system/cpu/cpu0/cpufreq/cpuinfo_min_freq  =   400000 [kHz]
/sys/devices/system/cpu/cpu0/cpufreq/cpuinfo_max_freq  =  1800000 [kHz]
/sys/devices/system/cpu/cpu0/cpufreq/energy_performance_preference = power [EPP]
/sys/devices/system/cpu/cpu0/cpufreq/energy_performance_available_preferences = default performance balance_performance balance_power power

/sys/devices/system/cpu/cpu1..cpu7: omitted for clarity, use -v to show all

/sys/devices/system/cpu/intel_pstate/status            = active
/sys/devices/system/cpu/intel_pstate/min_perf_pct      =   8 [%]
/sys/devices/system/cpu/intel_pstate/max_perf_pct      = 100 [%]
/sys/devices/system/cpu/intel_pstate/no_turbo          =   1
/sys/devices/system/cpu/intel_pstate/hwp_dynamic_boost =   0
/sys/devices/system/cpu/intel_pstate/turbo_pct         =  68 [%]
/sys/devices/system/cpu/intel_pstate/num_pstates       =  46
/sys/module/workqueue/parameters/power_efficient       = N
/proc/sys/kernel/nmi_watchdog                          = 0

+++ Platform
/sys/firmware/acpi/platform_profile                    = performance
/sys/firmware/acpi/platform_profile_choices            = low-power balanced performance
/sys/devices/platform/thinkpad_acpi/dytc_lapmode       = 0

涼しくなってきたら設定を戻しましょう.

それと去年は問題なかったので経年劣化で熱伝導グリスが乾いてきているのかもしれません.億劫ですがヒートシンクにグリスを塗り直すと良くなる気もします.

環境

$ dpkg -l | grep tlp
ii  tlp                                                 1.10.2-2                                        all          Optimize laptop battery life
ii  tlp-pd                                              1.10.2-2                                        all          Switch Power Profiles from the Desktop
ii  tlp-rdw                                             1.10.2-2                                        all          Switch Wi-Fi and Bluetooth on/off automatically
$ lsb_release -dr
Description:    Debian GNU/Linux forky/sid
Release:        n/a
$ arch
x86_64
]]>
https://matoken.org/blog/2026/09/02/change-laptop-cpu-settings-with-tlp-to-lower-temperature/feed/ 1
ClamAVのデスクトップUIのClamUI https://matoken.org/blog/2026/09/01/clamui-of-clamavs-desktop-ui/ https://matoken.org/blog/2026/09/01/clamui-of-clamavs-desktop-ui/#respond Mon, 31 Aug 2026 21:31:25 +0000 https://matoken.org/blog/?p=5648

以下の記事で新しいClamAVのデスクトップUIツールのClamUIを知ったので少し試してみました.

ClamUI推奨のflatpakをはじめAppImage, debなどが用意されています.他にもuvでも入るようです.
今回はAppImageを利用.

$ wget -c https://github.com/linx-systems/clamui/releases/download/v0.4.0/ClamUI-0.4.0-x86_64.AppImage
$ chmod u+x ClamUI-0.4.0-x86_64.AppImage
Note

hashや署名などは見当たらず.念の為VirusTotalでcheck.

$ vt analysis YjkyYmIxYTg0YTZjYjNmYTFhMWQzNzNkYjljM2ZkNjc6MTc4ODE5MDI2OQ== | grep stats: -A10
  stats:
    confirmed-timeout: 0
    failure: 1
    harmless: 0
    malicious: 0
    suspicious: 0
    timeout: 0
    type-unsupported: 12
    undetected: 62
  status: "completed"

起動するとこんな画面.

ClamUI01

こんな感じでウィルススキャンできます.

ClamUI02

EICAR Testを叩くとEICAR Test fileを作ってテストするようです.

ClamUI03

これだとあまり意味がないような気がするので自分でTest fileを用意したほうがいいような気がします.

ちなみにClamAVのよく使われているフロントエンドとしてclamtkというものがあります.こちらだとDebian packageで導入できて楽ではあります.

ClamTk
]]>
https://matoken.org/blog/2026/09/01/clamui-of-clamavs-desktop-ui/feed/ 0
Amazon Prime VideoをAndroidスマホからScrcpyでPCの画面に転送 https://matoken.org/blog/2026/08/30/android-2-amazon-prime-video/ https://matoken.org/blog/2026/08/30/android-2-amazon-prime-video/#comments Sat, 29 Aug 2026 21:00:00 +0000 https://matoken.org/blog/?p=5635

攻殻機動隊を観るためにAmazon Primeに一時的に加入しました.氷の城壁もあるしということでとりあえず30日無料で.

LinuxでもPCのウェブブラウザで視聴可能です.でも途中で止まりがちです.とくにCMになるところでよく止まる.そしCMがうるさく体験が悪い…….

Android版Prime Videoアプリを利用

AndroidのPrime Videoアプリだといったんローカルにダウンロードした後(オフラインでも)再生可能で途中で止まらないようです.そしてPCウェブブラウザと比べてCMが少ない感じです.
しかしスマホだと画面が小さすぎます.

Android画面をScrcpyでPCに転送

PCにscrcpyで転送できないかなと試すと真っ黒です.画面保護が効いているとAndroid 12以降+Scrcpyで画面転送するとこうなってしまいます.

Android 11端末(Rakuten Hand 5G)があったのでこちらで試すと保護された画面も見えそうです.

Scrcpyの --new-display オプションでPCのフルスクリーンでと思ったのですが,このアプリはサブディスプレイ非対応と言われてしまいました.

普通にScrcpyでメイン画面を転送してフルスクリーンにすると転送できますが,スマホとPCのアスペクト比が合わないので余白が大きいです.以前やったように,真ん中あたりをcropします.

amazon prime 01

スマホ解像度は 1520×720 で 1280×720 をくり抜くといいと思うので, scrcpy --crop=720:1280:0:$(1520-1280)/2 な感じでくり抜きました.

amazon prime 02
Note
解像度を間違えて無効な解像度を指定するとRakuten hand 5Gは再起動がかかってしまうようです.

オーディオ転送

これでOKかと思ったら音がで出ません.

[server] ERROR: Failed to start audio capture
[server] ERROR: On Android 11, audio capture must be started in the foreground, make sure that the device is unlocked when starting scrcpy.
WARN: Demuxer 'audio': stream explicitly disabled by the device

以前は3.5mmオーディオジャック経由やBluetoothで音を転送していましたがScrcpy 2.0からオーディオ転送に対応しているはずです.

以下のガイドによるとAndroid 11の制限で画面ロック解除後にScrcpy接続しないと音が出ないということでそのようにすると音も出るようになりました.

帯域不足?

Wi-Fi(2.4GHz 〜65Mbps)経由だと帯域が足りないのか帯域が必要そうな場所で画面が荒れます.USB(2.0)接続にしたら安定しました.

コマンドはこんな感じにしました.

$ adb shell settings put system user_rotation 1 && (1)
scrcpy \
  --crop=720:1280:0:$(( (1520-1280)/2 )) \ (2)
  --turn-screen-off \ (3)
  --stay-awake (4)
  1. 画面を横に回転

  2. 画面の真ん中をくり抜き

  3. Androidスクリーンをoff

  4. 画面ロック抑制

amazon prime 03

ということで一旦AndroidのAmazon Primeアプリでダウンロードすることで安定して再生可能,Android 11であれば保護画面もScrcpyでPCに転送可能でした.

正攻法だとGoogle TV Streamerとかを使ってAndroidのキャスト機能でテレビやディスプレイに転送,PCに転送だとHDMIキャプチャ経由でという感じでしょうか.(著作権保護に引っかかるかも?)
しかし,初代Chromecastに比べて大分高いですね…….

環境

受信PC
$ scrcpy --version
scrcpy 4.1 <https://github.com/Genymobile/scrcpy>

Dependencies (compiled / linked):
 - SDL: 3.4.12 / 3.4.14
 - libavcodec: 62.28.102 / 62.28.102
 - libavformat: 62.12.102 / 62.12.102
 - libavutil: 60.26.102 / 60.26.102
 - libavdevice: 62.3.102 / 62.3.102
 - libusb: - / 1.0.30
$ lsb_release -dr
Description:	Debian GNU/Linux forky/sid
Release:	n/a
$ arch
x86_64
Android
$ adb shell dumpsys package com.amazon.avod.thirdpartyclient | grep version
    versionCode=469002047 minSdk=28 targetSdk=36
    versionName=3.0.469.2047
    signatures=PackageSignatures{e610cfa version:2, signatures:[e627f73a], past signatures:[]}
$ adb shell getprop ro.product.model
P780
$ adb shell getprop ro.build.version.release
11
$ adb shell getprop ro.build.version.sdk
30
$ adb shell getprop ro.product.cpu.abi
arm64-v8a
]]>
https://matoken.org/blog/2026/08/30/android-2-amazon-prime-video/feed/ 1
WordPressで任意の拡張子ファイルをアップロードできるようにする https://matoken.org/blog/2026/08/29/wordpress-add-mime/ https://matoken.org/blog/2026/08/29/wordpress-add-mime/#respond Fri, 28 Aug 2026 22:37:17 +0000 https://matoken.org/blog/?p=5626

このblogはWordPressというOSSのCMSを利用しています.このなかにファイルアップロード機能があり,画像のアップロードができます.
でも他の形式もアップロードしたいことがあります.今回は log
標準状態で非対応のファイル形式をupしようとするとエラーとなります.

このファイルタイプをアップロードする権限がありません。

WordPressのプラグインを利用して任意のファイル形式をアップロードできるようにしました.

plaintextのlogファイルなので適当なPastebinサービスに置くとかも考えましたがこのblogも10年以上運用していてそういった物がサービス終了して見えなくなるとかもよくあります.
ここは自分の管理しているサーバーなので,適当にディレクトリを掘ってそこにファイルを置くのでもいいかとも思いましたが,引っ越しをしたい場合やバックアップ取得時に少し手間が増えそうです.

ということでプラグインを探します.検索して利用者が多そうなもので以下を使ってみました.

WordPressの管理画面のプラグインページから「プラグインを追加」→「プラグインの検索」から該当のプラグインの「今すぐインストール」から導入しました.
プラグインの導入に成功したらプラグインが有効になっているのを確認して,「設定」→「Mime Type設定」で設定できます.

設定画面の下部の「追加の項目」から追加したい拡張子とMIME タイプを記述していきます.除外の設定もあります.
一通り書いたら「設定を保存」ボタンで反映します.

add mime01

保存した結果は上部の「List of allowed mime types and file extensions by WordPress」で確認できます.黒文字は規定の設定で,赤文字が追加した設定のようです.

add mime02

セキュリティオプションという項目もありました.

*プラグインは、WordPress コアによるいくつかのセキュリティチェックを回避します。それらを避けたくない場合は、次の設定をオンにしてください。

ということでonにしたほうがセキュアそうです.規定値は全部外れていました.今のところ全部onにしても動いていそうです.

add mime03

追加したファイル形式のファイルをアップロードしてみるとうまく行きました.

add mime04

以下が実際のファイルへのリンクです.

ということで好きなファイルをアップロードできるようになりました.
ファイルアップロードは気を使うところですが,今回は自分しかアップロードしないので問題ないはず…….

環境
  • WordPress 7.1

  • Add MIME Types 3.2.0

]]>
https://matoken.org/blog/2026/08/29/wordpress-add-mime/feed/ 0
HUAWEI Pocket WiFi 506HWを55円で購入してSIMロック解除して利用 https://matoken.org/blog/2026/08/27/huawei-pocket-wifi-506hw-sim-unlick/ https://matoken.org/blog/2026/08/27/huawei-pocket-wifi-506hw-sim-unlick/#respond Thu, 27 Aug 2026 10:55:28 +0000 https://matoken.org/blog/?p=5603

例によってハードオフへ.PCのジャンクの棚がまた減っていて悲しい.
最近話題?のSoftbankAir 6があったけど本体のみで電源なかったのでスルー.そしてHUAWEI 506HW 55円を見かけてその場で検索してみるとSIM UnLock出来そうだったので購入.
SIM UnLockしてMVNOのSIMが使えました.

管理画面への接続

充電しようとするとUSB-microBでした.ケーブルを出してきて接続して充電.
そこそこ充電できたかなという辺りで電源ボタンを数秒押すと起動.
しばらく待つとUSB経由でCDC ethernetで繋がり,ipも降ってきました.

起動前のdmesg(sr0をmountしようとするとエラー)
[11025.369349] usb 1-3: new high-speed USB device number 8 using xhci_hcd
[11025.508318] usb 1-3: New USB device found, idVendor=12d1, idProduct=1c20, bcdDevice= 1.02
[11025.508339] usb 1-3: New USB device strings: Mfr=1, Product=2, SerialNumber=0
[11025.508347] usb 1-3: Product: HUAWEI_MOBILE
[11025.508353] usb 1-3: Manufacturer: HUAWEI_MOBILE
[11025.509335] usb 1-3: Device is not authorized for usage
[11028.131368] usb-storage 1-3:1.0: USB Mass Storage device detected
[11028.132423] scsi host1: usb-storage 1-3:1.0
[11028.132999] usb 1-3: authorized to connect
[11029.171335] scsi 1:0:0:0: CD-ROM            HUAWEI   Mass Storage     2.31 PQ: 0 ANSI: 2
[11029.171810] scsi 1:0:0:0: Attached scsi generic sg1 type 5
[11029.225161] sr 1:0:0:0: Power-on or device reset occurred
[11029.227309] sr 1:0:0:0: [sr0] scsi-1 drive
[11029.248835] cdrom: Uniform CD-ROM driver Revision: 3.20
[11029.269441] sr 1:0:0:0: Attached scsi CD-ROM sr0
起動時のdmesg
[11133.768488] usb 1-3: new high-speed USB device number 9 using xhci_hcd
[11133.906009] usb 1-3: New USB device found, idVendor=12d1, idProduct=1f01, bcdDevice= 1.02
[11133.906027] usb 1-3: New USB device strings: Mfr=1, Product=2, SerialNumber=3
[11133.906034] usb 1-3: Product: HUAWEI_MOBILE
[11133.906040] usb 1-3: Manufacturer: HUAWEI_MOBILE
[11133.906048] usb 1-3: SerialNumber: 0123456789ABCDEF
[11133.906731] usb 1-3: Device is not authorized for usage
[11137.108534] usb 1-3: USB disconnect, device number 9
[11137.452436] usb 1-3: new high-speed USB device number 10 using xhci_hcd
[11137.590328] usb 1-3: New USB device found, idVendor=12d1, idProduct=1f01, bcdDevice= 1.02
[11137.590352] usb 1-3: New USB device strings: Mfr=1, Product=2, SerialNumber=3
[11137.590361] usb 1-3: Product: HUAWEI_MOBILE
[11137.590369] usb 1-3: Manufacturer: HUAWEI_MOBILE
[11137.590375] usb 1-3: SerialNumber: 0123456789ABCDEF
[11137.591208] usb 1-3: Device is not authorized for usage
[11138.179165] usb-storage 1-3:1.0: USB Mass Storage device detected
[11138.180088] scsi host1: usb-storage 1-3:1.0
[11138.180855] usb 1-3: authorized to connect
[11139.032028] usb 1-3: USB disconnect, device number 10
[11140.464388] usb 1-3: new high-speed USB device number 11 using xhci_hcd
[11140.602014] usb 1-3: New USB device found, idVendor=12d1, idProduct=14db, bcdDevice= 1.02
[11140.602034] usb 1-3: New USB device strings: Mfr=1, Product=2, SerialNumber=0
[11140.602042] usb 1-3: Product: HUAWEI_MOBILE
[11140.602049] usb 1-3: Manufacturer: HUAWEI_MOBILE
[11140.602803] usb 1-3: Device is not authorized for usage
[11142.205237] cdc_ether 1-3:1.0 eth0: register 'cdc_ether' at usb-0000:00:14.0-3, CDC Ethernet Device, 0c:5b:8f:27:9a:64
[11142.206593] usb 1-3: authorized to connect
[11142.229533] cdc_ether 1-3:1.0 enx0c5b8f279a64: renamed from eth0
起動時のlsusb
$ lsusb -d 12d1:
Bus 001 Device 011: ID 12d1:14db Huawei Technologies Co., Ltd. E353/E3131
Note
詳細(-vvvはこちら)
ipアドレス情報
$ ip -4 addr show enx0c5b8f279a64
22: enx0c5b8f279a64: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc fq_codel state UNKNOWN group default qlen 1000
    inet 192.168.128.100/24 brd 192.168.128.255 scope global dynamic noprefixroute enx0c5b8f279a64
       valid_lft 85552sec preferred_lft 85552sec

http://192.168.128.1/ にアクセスしてみると管理画面に繋がりました.

SoftBank以外のSIMを刺した状態で設定に遷移しようとすると,SIMロック解除画面になります.このSIMロック解除コードを入手してアンロックする必要があります.

506HW simunlock01
Note
初期パスワードは admin でした.パスワードが不明な場合は物理リセットボタンもあります.

SIMロック解除手続き

以下のあたりを読むと,SoftBankのサイトからアンロック解除手続きができるようです.SoftBank IDを取得して,端末のIMEIを登録することで手続きができました.このとき,SoftBank IDの取得にはSMS認証が必要でした.今回はpovo 2.0の回線を利用.

506HW simunlock02

手続きはできましたが,受付は24時間やっているけれど21時から09時の間は処理を行っていないそうで次の日を待つことに.

24時間受付(メンテナンスなどを除く)
21時から9時までの受付分は9時以降順次処理を進めます。

そして次の日は土曜日でしたが,09:01にSIMロック解除コードの載ったSMSが届いていました.

506HW simunlock03

この解除コードを管理画面で入力するとSIMがアンロックされ,APNの設定などが可能になります.でも,APNの設定をしても圏外のまま.1回再起動をすると電波を掴んで接続できました.

506HW simunlock04

使い勝手

この端末の対応周波数はここにありました.

家に吹いているのはdocomo 19, au 18, SoftBank 8 なので家ではSoftBankでしか使えないと思います.

現在SoftBank系のSIMは古いAndroid端末に挿してモバイルデータはoffにして非常時にテザリングを有効にして使う感じにしていますが,これがいざ使おうと思うと電池が切れていたりとちょっと面倒.
この端末はカタログ値で5秒と起動が速く,実際Wi-FiでもLaptopに前もってWi-Fi設定してあると電源を入れてから10秒以内に接続できているようです.いざというときに使うのに良さそうです.

この端末を買った次の日ちょうどビデオミーティングをしているときにメイン端末が熱でシャットダウンしてサブ端末からつなぎ直し,その時この端末が活躍しました.

バッテリーはカタログ値で約6時間,1.5h位使ってみましたが1目盛りもバッテリー減らずまだ健康そうです.
バッテリー交換も可能ですが,結構高いので助かります.(互換バッテリーの謎ブランドで1300円くらいから,国内のショップでは4000円近く?)
富士ソフトの+F FS030Wのようにバッテリーレス運用ができれば更に良かったのですが,バッテリーを抜いてUSBケーブルを接続すると全ステータスLEDが緑点滅となり起動しないようです.残念.

WI-Fiは2.4GHzのみですが有線で使うことがほとんどだろうし,最大通信速度も下り最大112.5Mbps / 上り最大37.5Mbpsとなっていますが,自分の家で拾える基地鏡だと最大8Mbps出るかどうかなのでこれも問題ありません.

という感じで10年前の端末ですが,75gと軽量だし非常用にカバンに入れておくと良さそうです.

]]>
https://matoken.org/blog/2026/08/27/huawei-pocket-wifi-506hw-sim-unlick/feed/ 0
ターミナルグラフィックウェブブラウザのterminal-browser https://matoken.org/blog/2026/08/27/terminal-graphic-webbrowser-terminal-browser/ https://matoken.org/blog/2026/08/27/terminal-graphic-webbrowser-terminal-browser/#comments Wed, 26 Aug 2026 21:42:49 +0000 https://matoken.org/blog/?p=5577

先日,ターミナルグラフィックウェブブラウザのBrow6elを知って試しています.

このとき似ているterminal-browserも知ったのですが,macOS専用でした.

その後,v0.5.0でLinuxにも対応したので試してみました.

導入

公式ではcurl | bash が紹介されていますが,これは嫌いなので手動で導入します.
現時点ではmacOS arm64,Linux adm64, Linux arm64のバイナリアーカイブが用意されています.これをダウンロードして展開します.

ダウンロード
$ wget -c https://github.com/zenbu-labs/terminal-browser/releases/latest/download/terminal-browser-linux-x64.tar.gz
ハッシュとファイルサイズの確認
$ sha256sum terminal-browser-linux-x64.tar.gz (1)
7c2375593623a12109615eca94ceaeece6a6193c4cc955ba159215f0f6c09ff7  terminal-browser-linux-x64.tar.gz
$ wc -c terminal-browser-linux-x64.tar.gz (2)
137362872 terminal-browser-linux-x64.tar.gz
$ curl -s https://terminal-browser.sh/install | grep terminal-browser-linux-x64.tar.gz (3)
linux-x64 https://terminal-browser.sh/install/dl/stable/v0.6.0/terminal-browser-linux-x64.tar.gz 7c2375593623a12109615eca94ceaeece6a6193c4cc955ba159215f0f6c09ff7 137362872"
  1. sha256sumの確認

  2. ファイルサイズの確認

  3. sha256sumとファイルサイズはinstall scriptの上の方にある

アーカイブの展開
$ fuse-archive terminal-browser-linux-x64.tar.gz
fuse-archive: Created mount point 'terminal-browser-linux-x64'

terminal-browserの実行環境

terminal-browserはSixelに対応しておらず,Kittyに対応しています.Kittyに対応したターミナルエミュレータを使う必要があります.
今回はKitty Graphicの元となっているKittyを選びました.

Tip
Kitty terminalで日本語入力を行いたい場合環境変数 GLFW_IM_MODULE=ibus が必要です.これは Fcitx 5 を利用する場合でも ibus と設定するようです.

ちなみにKittyグラフックプロトコル非対応な端末でterminal-browserを実行するとGhosttyをお薦めされます.こだわりなどなければGhosttyが無難かもしれません.

  This terminal cannot show images, which terminal-browser needs.

  We recommend Ghostty:
  https://ghostty.org/download

  Note: any terminal that supports the kitty graphics protocol is supported

terminal-browserの実行

引数なしで起動したり,

$ ./terminal-browser-linux-x64/terminal-browser/bin/terminal-browser

urlを指定して開いたりいくつかのコマンドラインオプションやコマンドもあります.

$ ~/Downloads/terminal-browser-linux-x64/terminal-browser/bin/terminal-browser --help
Usage: terminal-browser [url] [options]
       terminal-browser <command> [args]

  open      Open the browser in a terminal pane
  ls        List running browsers and their tabs
  setup     Configure installed terminals so terminal-browser works best
  upgrade   Upgrade to the latest release
  new-tab   Open a tab here, and a browser too if there is none
  shutdown  Stop the daemon
  action    Use the open browser through the agent-browser CLI

terminal-browser <command> --help for one command's options
terminal-browser --version prints the installed version

操作はショートカットキーが用意されていたりしますがほぼマウス操作で済む感じです.

terminal browser01
terminal browser02
Note

この記事を書いていて気づきましたが,タブ上のタイトルやアドレスバーのサジェストなどの日本語が豆腐になってしまいますね…….以下のissueによると中国語は本文も豆腐になるようです.

ssh経由でリモート起動

VPSにもterminal-browserをダウンロードしてssh経由で利用してみます.

$ ssh ${user}@${remote}
$ wget -c https://github.com/zenbu-labs/terminal-browser/releases/latest/download/terminal-browser-linux-x64.tar.gz
$ wc -c terminal-browser-linux-x64.tar.gz
137362872 terminal-browser-linux-x64.tar.gz
$ sha256sum terminal-browser-linux-x64.tar.gz
7264ca86fd0b5f5ad597e0fe5517da7a67e7079633151067c51f13238ee0cc45  terminal-browser-linux-x64.tar.gz
$ tar tvzf terminal-browser-linux-x64.tar.gz
$ tar xzf terminal-browser-linux-x64.tar.gz
$ ./terminal-browser/bin/terminal-browser
terminal browser03
terminal browser04

v0.5.0時点では動作が妙に重くなったりすることがありましたが,現在の最新版のv0.6.0では問題なく動いていそうです.

sshモード

v0.6.0 でsshモードが付きました.
このsshモードはssh経由でリモートサーバーに接続して利用するのですが,Chromiumはローカルで動作してChromiumが要求した通信をリモートから取得します.
--ssh ${user}@${remote} のように指定しますが, ~/.ssh/config を見てくれるようなので助かります.ポートや鍵を指定したい場合はこれで設定すれば良さそうです.

$ ~/terminal-browser-linux-x64/terminal-browser/bin/terminal-browser --ssh ${user}@${remote}

ローカルからリモートにデータを取りに行くのでローカルで動かすのと同じくらいの通信速度です.(fast.comではupが数倍に見える?)
使いどころがあまり思いつきませんが,VPN的な使い方がいいのかな?

terminal browser05
Note

VS Codeをターミナルで利用するterminal-codeというツールがあるのですが,このツールも同時にsshモードに対応して既視感があるなと思ってよく見ると同じ作者でした.ちなみにこのツールはterminal-browser内蔵でjsを呼んでいるようです.試してみようと思いましたがpathが固定で面倒で諦めちゃいました.

Zellij経由での利用

先週あたりにリリースされたターミナルワークスペースのZellij v0.45.0でちょうどKitty Graphics Protocolに対応していたのでちょっと試してみます.

うまく表示されることもあれば動かないことも?kitten icatでの画像表示でも同様.挙動がまだよくわかりません.ZellijはKittyに対応したばかりなのでバグかも?

terminal browser06

Brow6elとの比較

Brow6elはAppImageがあったりSixel/Kitty両対応,カスタマイズもしやすい感じです.
対してterminal-browserはChromiumを使っているのでWeb互換性が高く操作もマウスで大体okなので学習コストも低く感じます.

用途により使い分けでしょうか.

環境

$ ./terminal-browser-linux-x64/terminal-browser/bin/terminal-browser --version
terminal-browser v0.6.0
$ dpkg-query -W kitty
kitty	0.48.2-1
$ lsb_release -dr
Description:    Debian GNU/Linux forky/sid
Release:        n/a
$ arch
x86_64
]]>
https://matoken.org/blog/2026/08/27/terminal-graphic-webbrowser-terminal-browser/feed/ 1
グラフックターミナルウェブブラウザのBrow6elをリモートVPSで実行 https://matoken.org/blog/2026/08/03/run-brow6el-remotely/ https://matoken.org/blog/2026/08/03/run-brow6el-remotely/#comments Sun, 02 Aug 2026 22:04:21 +0000 https://matoken.org/blog/?p=5556

グラフックターミナルウェブブラウザのBrow6elをリモートのVPSで動かしてみました.

普通にVPS上でbuildしてもいいのですが,Brow6elにはAppImageを作成する build_appimage.sh が提供されているのでローカルPCでこれを使い,Brow6elのAppImageを作って利用することにします.
build.sh が終わって ./build/run_brow6el.sh でBwow6elが動作する状態で実行します.

$ ./build_appimage.sh
   :
✓ AppImage created: build/brow6el-x86_64.AppImage

linuxdeployを使ってAppImageをパッケージングしてくれます.

$ ls -l build/brow6el-x86_64.AppImage
-rwxr-xr-x 1 matoken matoken 167807480 Aug  3 06:26 build/brow6el-x86_64.AppImage
$ file build/brow6el-x86_64.AppImage
build/brow6el-x86_64.AppImage: ELF 64-bit LSB pie executable, x86-64, version 1 (SYSV), static-pie linked, BuildID[sha1]=804289becc7fc6672c279ca50542e32508c1e518, stripped

出来上がった brow6el-x86_64.AppImage を実行するとBrow6elが起動します.
リモートのVPSにコピーして,

$ rsync -avcP build/brow6el-x86_64.AppImage $REMOTE:~/bin/

ssh経由で実行すると失敗?

$ ssh ${REMOTE} ~/bin/brow6el-x86_64.AppImage
Profile mode: temporary
Profile path: /tmp/brow6el_809104_3878246043
Brow6el - Terminal Web Browser with Sixel Support
Graphics detection: Sixel=NO, Kitty=NO
Error: Your terminal does not support graphics rendering
Please use a terminal emulator with graphics support:
  Sixel: mlterm, xterm, wezterm, foot, etc.
  Kitty: kitty, ghostty, wezterm, etc.

ssh ${REMOTE} convert rose: sixel: は大丈夫なのでSixel周りは問題ないと思うのですが.
とりあえず,ssh loginした後 brow6el-x86_64.AppImage を実行すれば起動します.

$ ssh ${REMOTE}
$ brow6el-x86_64.AppImage -v
Brow6el ec0bc3f
User-Agent: Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/148.0.7778.96 Brow6el/ec0bc3f
$ brow6el-x86_64.AppImage

VPSでfast.comで速度を見ると恐らくVPSのリミット上限になっているのかなという感じの速度.

brow6el fast.com

ちなみに同じ時間の自宅はこんな感じです.

$ speedtest-cli --simple
Ping: 64.723 ms
Download: 13.05 Mbit/s
Upload: 2.78 Mbit/s

回線によっては地図系のサービスで一部レイヤーの読み込みに失敗してしまうことがあり,例えば台風の後などトヨタの通れた道マップでこの道路のがけ崩れ未だ治ってないのかと思っていたら実は読み込めていないだけだったたこともありました.こういうときなどVPSなどのリモートでBrow6elを動かすと良さそうです.

brow6el toyotamap

ただ,EmbeddedとはいえChromiumなので結構RAMを使います.そこそこRAMの載ったものを使ったほうが良さそうです.
無料だとXServerの無料VPSがRAM 2GB/4GBなので動かしやすそうです.でも今見ると受付停止中でした.

ちなみにGNU timeコマンドでメモリを確認するとこんな感じ.長時間だとまた増えそうです.

time -f %M

217312

URL指定なしで開いて閉じる

293456

www.google.comを開いて閉じる

371624

SperkerDeckでスライドを1つ読む

397432

AsciiDoctor Reveal.jsで作られた45pのスライドを閲覧

417480

YouTubeで検索した後90秒の動画を再生

486984

NextcloudにloginしてNoteでメモをしたり

1875016

comic-walker.comで漫画を5話分読んで閉じる

Note
最後のcomic-walkerがとてもRAM消費量が多いですが,何か間違ったかフルスクリーンで読んだせいかもしれません.
]]>
https://matoken.org/blog/2026/08/03/run-brow6el-remotely/feed/ 6
MComixでSpace keyが使えなくなった https://matoken.org/blog/2026/07/30/space-key-no-longer-works-in-mcomix/ https://matoken.org/blog/2026/07/30/space-key-no-longer-works-in-mcomix/#respond Wed, 29 Jul 2026 22:16:22 +0000 https://matoken.org/blog/?p=5546

最近Debian sid amd64環境のMComixでスペースキーでページ送りができなくなりました.
PgUpで代替はできますが慣れません.Shift + Spaceでページ戻りは効くし別のアプリケーションではSpaceは効きます.
キーボード・ショートカットの設定画面でSpaceを設定することもできるのでSpace自体はアプリに渡っていそう.

キーボードショートカットをリセットしたり,設定ファイル自体を全部消してみたりもしましたが動作は変わりません.

MComixのTicketに以下のようなものが.Waylandでキーバインドが壊れていて,commit 274e95で修正されていそうです.

以下がそのcommit.

Debian packageのMComixのファイルは以下のよう.

$ dpkg -L mcomix | grep keybindings.py
/usr/lib/python3/dist-packages/mcomix/keybindings.py

ということでこんな感じに修正.

$ diff -u /usr/lib/python3/dist-packages/mcomix/keybindings.py /usr/lib/python3/dist-packages/mcomix/keybindings.py.org
--- /usr/lib/python3/dist-packages/mcomix/keybindings.py	2026-07-30 06:50:54.227287451 +0900
+++ /usr/lib/python3/dist-packages/mcomix/keybindings.py.org	2025-09-28 11:56:17.000000000 +0900
@@ -176,7 +176,7 @@
         # Load stored keybindings, or fall back to passed arguments
         keycodes = self._action_to_bindings[name]
         if keycodes == []:
-            keycodes = [tuple(Gtk.accelerator_parse(binding)) for binding in bindings]
+            keycodes = [Gtk.accelerator_parse(binding) for binding in bindings ]

         for keycode in keycodes:
             if keycode in list(self._binding_to_action.keys()):
@@ -207,7 +207,7 @@
         """
         assert name in BINDING_INFO, "'%s' isn't a valid keyboard action." % name

-        nb = tuple(Gtk.accelerator_parse(new_binding))
+        nb = Gtk.accelerator_parse(new_binding)
         old_action_with_nb = self._binding_to_action.get(nb)
         if old_action_with_nb is not None:
             # The new key is already bound to an action, erase the action
@@ -216,7 +216,7 @@

         if old_binding and name != old_action_with_nb:
             # The action already had a key that is now being replaced
-            ob = tuple(Gtk.accelerator_parse(old_binding))
+            ob = Gtk.accelerator_parse(old_binding)
             self._binding_to_action[nb] = name

             # Remove action bound to the key.
@@ -238,7 +238,7 @@
         """ Remove binding for an action """
         assert name in BINDING_INFO, "'%s' isn't a valid keyboard action." % name

-        ob = tuple(Gtk.accelerator_parse(binding))
+        ob = Gtk.accelerator_parse(binding)
         self._action_to_bindings[name].remove(ob)
         self._binding_to_action.pop(ob)

@@ -299,7 +299,7 @@
         for action in BINDING_INFO.keys():
             if action in stored_action_bindings:
                 bindings = [
-                    tuple(Gtk.accelerator_parse(keyname))
+                    Gtk.accelerator_parse(keyname)
                     for keyname in stored_action_bindings[action] ]
                 self._action_to_bindings[action] = bindings
                 for binding in bindings:

問題なく動作するようになっていそうです.
このままだとパッケージアップデートで上書きされてしまいますが,本家と同じバージョンだし恐らく次のアップデートでこの修正は入ると思います.

最近Pythonのアップデートがあったのでその辺りで壊れたのかもしれません.

$ apt history-list | grep -i python | grep 2026
284  install libhsa-runtime64-1 python...2026-01-06  05:18:29  I,U,R    5
356  install python3-tables              2026-02-25  05:31:49  I,U,R    5
533  install python3-poetry              2026-06-08  21:04:04  Install  11
628  install python3                     2026-07-23  18:03:44  I,U,R    66
環境
$ mcomix --version
MComix 3.1.1
$ dpkg-query -W mcomix python3-cairo python3-gi python3-pil python3 gir1.2-gtk-3.0 python3-gi-cairo
gir1.2-gtk-3.0:amd64    3.24.52-1
mcomix  3.1.1-2
python3 3.14.6-1
python3-cairo   1.27.0-3
python3-gi      3.56.3-2
python3-gi-cairo        3.56.3-2
python3-pil:amd64       12.3.0-1
$ lsb_release -dr
Description:    Debian GNU/Linux forky/sid
Release:        n/a
$ arch
x86_64
]]>
https://matoken.org/blog/2026/07/30/space-key-no-longer-works-in-mcomix/feed/ 0