You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
trdr; Google Chrome requires "body" and "actions" capabilities. So it's better to return ("body", "actions") from GetCapabilities().
I love statnot because I can create my scripts to control notifications. In my case, most of the notification comes from Google Chrome. So I'm using statnot to receive notifications from Google Chrome. But I had to modify the original source code a little bit.
[How to setup / reproduce]
Google Chrome checks these two things.
Checks if "org.freedesktop.Notifications" is "activatable" or not.
Checks if GetCapabilities() returns "body" and "actions".
So I had to do these steps to use statnot to receive notifications from Google Chrome.
Now, dbus can activate statnot if there is no statnot process. And Google Chrome requires this. As you can see on the chrome's code [Ref:1], Google Chrome uses "ListActivatableNames". This is presumably because this is a more reliable way. If the statnot process dies, it will be automatically restarted.
2. Modify statnot's GetCapabilities function to return "body" and "actions"
Google Chrome requires "body" and "actions" capabilities at minimum [Ref:2]. So I had to modify statnot's GetCapabilities function like below.
This is my script to launch Google Chrome. I had to launch Google Chrome via dbus-launch (or we can use export $(dbus-launch)). And also we need to enable native notifications flag (this can be set via chrome://flags/#enable-native-notifications).
In summary, my request is to return ("body", "actions") from GetCapabilities(). But it's OK for now because I just need to modify the original statnot code a bit.
Thank you for creating statnot.
trdr; Google Chrome requires "body" and "actions" capabilities. So it's better to return ("body", "actions") from GetCapabilities().
I love statnot because I can create my scripts to control notifications. In my case, most of the notification comes from Google Chrome. So I'm using statnot to receive notifications from Google Chrome. But I had to modify the original source code a little bit.
[How to setup / reproduce]
Google Chrome checks these two things.
So I had to do these steps to use statnot to receive notifications from Google Chrome.
1. Make statnot "activatable"
Create a file here.
The contents need to be below. Please modify the shell script as you like.
My shell script looks like below.
Now, dbus can activate statnot if there is no statnot process. And Google Chrome requires this. As you can see on the chrome's code [Ref:1], Google Chrome uses "ListActivatableNames". This is presumably because this is a more reliable way. If the statnot process dies, it will be automatically restarted.
2. Modify statnot's GetCapabilities function to return "body" and "actions"
Google Chrome requires "body" and "actions" capabilities at minimum [Ref:2]. So I had to modify statnot's GetCapabilities function like below.
3. Launch Google Chrome with options
This is my script to launch Google Chrome. I had to launch Google Chrome via dbus-launch (or we can use export $(dbus-launch)). And also we need to enable native notifications flag (this can be set via chrome://flags/#enable-native-notifications).
In summary, my request is to return ("body", "actions") from GetCapabilities(). But it's OK for now because I just need to modify the original statnot code a bit.
Thank you for creating statnot.
[Ref:1]
https://source.chromium.org/chromium/chromium/src/+/master:chrome/browser/notifications/notification_platform_bridge_linux.cc;l=67?q=ListActivatableNames
[Ref:2]
https://source.chromium.org/chromium/chromium/src/+/master:chrome/browser/notifications/notification_platform_bridge_linux.cc;l=491
The text was updated successfully, but these errors were encountered: