Firefox のuserscript で通知を出そうとしましたがうまく行きません.
通知の権限も有効にしているつもりです.
> Notification.requestPermission()
Promise { <state>: "pending" }

conspleで叩いてもエラーにならないけど表示されません.
> Notification.permission
"granted"
> new Notification("通知テスト", { body: "Firefoxからのテスト通知です" });
Notification { onclick: null, onshow: null, onerror: null, onclose: null, title: "通知テスト", dir: "auto", lang: "", body: "Firefoxからのテスト通知です", tag: "", icon: "" }以下の通知テストページでも同様に表示されません.
dunst も起動していて, notify-send ではポップアップがでてきます.
$ ps -ef | grep dunst matoken 7506 7398 0 Dec01 ? 00:00:00 /bin/sh -c dunst matoken 7515 7506 0 Dec01 ? 00:00:21 dunst matoken 797170 2174862 0 19:44 pts/10 00:00:00 grep dunst $ notify-send "テスト" "こんにちは"
Firefox <→ dunst のどこかで消えていそうです.
以下のフォーラムを参考にFirefox の通知を使うようにしてみます.
アドレスバーに about:config を入力し, alerts.useSystemBackend を検索し, false に変更.
Firefox を終了して,再度起動して通知を試します.
するとFirefox による通知が表示されるようになりました.

図 1. Firefoxでの通知
そして再度 true にするとlibnotify 側の通知も表示されるようになりました…….

図 2. Firefoxからlibnotifyへの通知
恐らく以下のコメントの方と同じ様にどこかのタイミングでおかしくなっていて設定をいじったタイミングで設定を見てくれるようになったようです.
I guess in one of these updates the default supposed value for that configuration changed from true to false, and after double toggling it firefox started to read it instead of assuming it (maybe?).
環境
$ dpkg-query -W firefox dunst libnotify-bin dunst 1.13.2-1 firefox 161.0.1-2 libnotify-bin 0.8.9-1 $ lsb_release -dr Description: Debian GNU/Linux forky/sid Release: n/a $ arch x86_64
Reposts