t_wの輪郭

トラックパッドのジェスチャーlibinput
Ubuntuでトラックパッドのジェスチャーを使う方法 ── トラックパッド再接続後にもジェスチャーし...`libinput-gestures-setup stop service autostart st...libinput-gesturesのsytemd user serviceを再起動するudevルールlibinput-gesturesをsystemd user serviceとして動かす『bulletmark/libinput-gestures: Actions gestures on...

この文章ではUbuntu24.04にてBluetooth接続のトラックパッド(Magic Trackpad 2)でジェスチャーを有効化した方法を説明します。

libinput-gesturesではトラックパッド再接続後にジェスチャーが効かなくなり、libinput-gestures.serviceを再起動すれば再度ジェスチャーが効くようになります。毎回コマンドを実行するのは手間ですので、bluetoothデバイスが接続されたときにlibinput-gesturesを自動で再起動するように設定します。


libinput-gesturesをインストールする

レポジトリ記載の手順に従ってインストールしてください。
レポジトリ:https://github.com/bulletmark/libinput-gestures

libinput-gesturesをsystemd user serviceとして動かす

下記コマンドを実行して、libinput-gesturesをsystemd user serviceとして動かします。
libinput-gestures-setup stop service autostart start


systemdでlibinput-gestures.serviceが動いていることを確認します
systemctl --user list-unit-files | grep gesture
下記のようにlibinput-gestures.serviceがenabledになっていることが表示されるはずです。

読み込み中...

あれ

2025/10/29 0:40:00

トラックパッド(Bluetooth)がつながってない状態でlibinput-gestures restartを実行すると、ジェスチャーが使えなくなる。
トラックパッドはPC起動時にはつながっておらず、クリック操作をしてしばらくするとつながる。
トラックパッド接続時にlibinput-gestures restartを実行できれば、問題が解決しそう。