Closed lukefromdc closed 1 year ago
To test, start up a wayfire session (or any other wlroots compositor) and run /usr/libexec/mate-notification-daemon
.Alternately add this line under
[autostart]
to wayfire.ini
notifications = /usr/libexec/mate-notification-daemon
From the panel menu, go to System->Preferences->Look and Feel->Popup Notifications and send a test notification or just run
notify-send "test"
From the Popup Notifications capplet (it works from menu even though mate-control-center doesn't yet run in wayland) you should even be able to move the notification to any corner of the desktop, as previous work to support wayland has already made that possible.
There was already an PR in 2013 to remove dbus-activation in general https://github.com/mate-desktop/mate-notification-daemon/pull/10 But i forgot the details why we didn't agree.
I am not sure if it is a good idea to disable the timeout for wayland because when using a display-manager to start wayfire session m-d-n works out of box. Also the notify-send
command is working fine.
When using gdm and creating a gdm-session and i see this environment variable DBUS_SESSION_BUS_ADDRESS=unix:path=/run/user/1004/bus
.
This seems to be necessary for dbus-notifications.
I am not against to disable the timer but i think this is a temporary hack for using m-d-n with a experimental session started with dbus-launch and not a real solution.
So please mark it as temporary solution.
The freedesktop-notifications specification is to use dbus-activation or starting the daemon without dbus-activation like in this old PR https://github.com/mate-desktop/mate-notification-daemon/pull/10
Links to freedesktop-notifications specifications you will find in PR above.
One advantage to remove dbus-activation in general like in the old PR and starting the daemon via autostart folder, is to avoid conflicts with other installed notification daemons. We have several report with installed kde-notification-daemon. K is before M in the alphabet in result dbus addresses kde-daemon. I do not prefer this solution but it sounds cleaner. Any way i never did test it.
As a proof-of-concept i made a rework of the old PR https://github.com/mate-desktop/mate-notification-daemon/pull/214 I like to test this for myself. I think the second commit which removes dbus-activation should be interesting for wayland sessions. Remove exit-on-idle functionality https://github.com/mate-desktop/mate-notification-daemon/pull/214/commits/8a02eb9adfe680b80c2a404582f77af719ff81d9 IHMO, we don't need dbus-activation when exit-on-idle isn't used in wayland. In other words why the daemon should be activated via dbus when the daemon is always running?
Should we close this in favor of https://github.com/mate-desktop/mate-notification-daemon/pull/214 which includes its functionality, keep it open but mark the wayland change as temporary in the commit message and comment in the code, or something else?
@lukefromdc Let it open for the moment. @cwendling doesn't want to remove dbus-activation. I don't understand why but this needs to be discussed. When we don't remove dbus-activation than i have to minimum remove the idle timeout, otherwise starting the daemon via session autostart is useless when the timeout kills the daemon.
OK, I will mark this in the message and code as potentially temporary and keep it open. We don't yet know the details of how dbus interaction will work in the finished mate-wayland session
I have changed the comments in the code and the commit message to indicate this could be temporary. Note that x11 behavior should be entirely unaffected by this PR
When running in any current wayland session we need to keep the daemon alive as restarting it when a notification is sent does not work.