SUMMARY *** NOTE: If you are reporting a crash, please try to attach a backtrace with debug symbols. See https://community.kde.org/Guidelines_and_HOWTOs/Debugging/How_to_create_useful_crash_reports *** When one configures "Do not disturb" in the notification settings in the plasma panel, notifications from the browser can still pop up on the screen, including on the desktop. If this hasn't yet been implemented, please also inhibit any popups from the browser too when this option is set. I think this would most likely be implemented with or using plasma-browser-integration...but if not please move this issue to plasma or another package. This would also be useful for tools that set "Gaming mode", because they could prevent all popups via a KDE API that allows setting "Do not disturb" for example. Firefox notifications can be stopped in about:preferences. STEPS TO REPRODUCE 1. Set do not disturb in Notifications 2. Get an email for a site where you allowed notifications in the browser or anything else that causes a notification popup OBSERVED RESULT The notification shows on the screen. EXPECTED RESULT The notification should not show on the screen and get displayed either never or when "Do not disturb" is unset. SOFTWARE/OS VERSIONS Linux/KDE Plasma: Debian 11 KDE Plasma Version: 5.20.5 KDE Frameworks Version: 5.78.0 Qt Version: 5.15.2 ADDITIONAL INFORMATION
plasma-browser-integration does not affect browser notifications. It's strange that the browser could bypass do not disturb mode, that's a bug in notifications then.
What browser is this? Firefox?
Thanks for moving the issue. Yes, it's the Firefox in Debian11 stable. Currently I don't have plasma-browser-integration installed. Note the relatively old version in Debian. I think this problem occurred either always or most of the time. I expected browser notifications to get suppressed in this mode but then I thought it was browser-specific and has to be configured in the Firefox preferences.
These notifications display in the top right, not the bottom right.
That means that the browser is bypassing the system notification server entirely and drawing them itself. This is a bug in the browser, and not anything we can fix in KDE.
Is this a known issue with Firefox then (all versions of it)? It can be fixed by KDE if one waits with the closure of the issue until an issue is created at the Firefox repo.
It's up to you to do that. :) See https://community.kde.org/Get_Involved/Issue_Reporting#Understand_what_the_resolution_statuses_mean
Done: https://bugzilla.mozilla.org/show_bug.cgi?id=1785822 You can get notified about relevant changes there and add any further useful input you may have. It would be better if it was standard practice to not close bugs before an issue at the dependency has been filed.
Is this really a bug with Firefox?? From this question it seems like it should work with KDE, please check. https://unix.stackexchange.com/questions/577244/firefox-notification-popup-timeout Firefox is v 102.3 and KDE Plasma is v 5.20.5
If the notification looks like any other system notification from any other app, Plasma is in charge of it, and it's a Plasma bug. If the notification has any other appearance, the app is sending it directly, and then the app is in charge of it and it's an app bug.
It looks similar to system notifications but these are a bit larger and display in the top right instead of the bottom right. Hopefully, it's not caused by running firefox in firejail (sandboxing). I'll test it again in Debian 12.
After some testing with https://cleverpush.com/en/test-notifications/ and without firejail sandboxing the problem has been identified: The firejail profile for firefox (~/.config/firejail/firefox.local) needs to contain this line to have the notifications use KDE notifications and thereby get hidden when "Do not disturb" is enabled (this is a security and privacy issue!): >dbus-user.talk org.freedesktop.Notifications However, assuming that the user somehow learns about this (which is unrealistic), it presents a substantial security vulnerability. Do you know what could be done to make the sandboxed firefox notifications use the system notifications without granting these dbus notifications permissions? For example a specific change at DBUS, a link to an open issue at DBUS about this problem, using another system notifications service, using other notifications if the dbus ones don't work, or something else?
I don't, sorry. But how is making a dbus connection a security issue? Tons of things will break without that. Blocking this is just asking for pain. Regardless, this isn't a Plasma issue; we can only manipulate notifications that use the standard freedesktop-spec-adhering notification system. We can't do anything with notifications shown directly by the app in the form of custom popup windows because the app can't access the dbus session bus because it's been sandboxed and this was deliberately disabled.