DebianとWindow Manager設定メモ
はじめに
- Debianはかなり保守的なディストリビューションで、パッケージの中身もけっこう古い。
bluetooth
UID(が何かわからないけど、これ)が有効でなければならないので念のため下記。
$ sudo modprobe hid_generic
$ sudo modprobe btusb
bluetoothデーモンが動いているかどうか確認。
$ systemctl status bluetooth
動いていなければ、下記の通り有効化して起動。
$ sudo systemctl enable bluetooth
$ sudo systemctl start bluetooth
アダプタの確認は下記。
$ bluetoothctl list
アダプタが表示されるのを確認するだけ。bluetoothctlを起動
$ bluetoothctl
すると、プロンプトが下記のようになる。
[bluetooth]#
bluetoothアダプタを立ち上げて、エージェントを指定して(?!)、bluetooth機器を検索する。
[bluetooth]# power on
[bluetooth]# agent on
[bluetooth]# default agent
[bluetooth]# scan on
下記のように目当てのデバイスが見つかったらMACアドレスをコピーしてペアリングの準備。
Device AA:BB:CC:DD:EE:FF Bluetooth Mouse
まず検索をやめる。なぜかうちはこれで検索がとまらない。原因またこんど調査。
[bluetooth]# scan off
下記のようにペアリング。
[bluetooth]# pair AA:BB:CC:DD:EE:FF
接続は下記。
[bluetooth]# connect AA:BB:CC:DD:EE:FF
次回からの自動接続は下記。
[bluetooth]# trust AA:BB:CC:DD:EE:FF
接続の状況を確認するのは下記。
[bluetooth]# bluetoothctl info AA:BB:CC:DD:EE:FF
"exit" で bluetoothctl から抜ける。
[bluetooth]# exit
なお、Windowsでペアリング、接続すると再接続できなくなるので、切断、ペアリングの解除をしてから、再度ペアリング、接続する必要がある。bluetoothctlでペアリングしている機器の検索は下記。
[bluetooth]# devices
切断は下記。
[bluetooth]# disconnect AA:BB:CC:DD:EE:FF
ペアリングの解除(?!)は下記。
[bluetooth]# remove AA:BB:CC:DD:EE:FF
bluetooth関係の操作をGUIでやる場合
"blueman" というのをインストールする。起動コマンドは "blueman-manager" 。
$ sudo apt install blueman
タスクトレイなどに常駐するのが、"blueman-applet" というやつみたいなので("blueman" をインストールしたら一緒に入るのかな?)GUI環境では下記のようにするとよい。
$ blueman-applet &
$ blueman-manager