Bug 408866 - Some apps cannot be configured in notification settings
Summary: Some apps cannot be configured in notification settings
Status: RESOLVED FIXED
Alias: None
Product: plasmashell
Classification: Plasma
Component: Notifications (show other bugs)
Version: master
Platform: Other Linux
: NOR normal
Target Milestone: 1.0
Assignee: Kai Uwe Broulik
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2019-06-18 09:28 UTC by Alex Barrero
Modified: 2019-06-18 15:13 UTC (History)
1 user (show)

See Also:
Latest Commit:
Version Fixed In:
Sentry Crash Report:


Attachments
Slack (flatpak) notification log (1.02 KB, text/plain)
2019-06-18 12:20 UTC, Alex Barrero
Details
Dropbox notification log (1.89 KB, text/x-log)
2019-06-18 15:06 UTC, Alex Barrero
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Alex Barrero 2019-06-18 09:28:54 UTC
SUMMARY
Some apps like Dropbox or containerized apps (snap/flatpak) which generate notifications, cannot be configured in the new notification settings section.

This app notifications will always be shown in the history and the number of notifications will appear in the task bar, unless you manually remove from the list. They are not available to configure in the application list.

This way I cannot mark the notifications of these apps to no appear in the history, so the only way to hide them is use the Do Not Disturb mode that silence all the apps.

STEPS TO REPRODUCE
1. Install dropbox
2. Generate an event that would show a notification
3. Display notification history and check that this application cannot be configured.

OBSERVED RESULT
The notificacion appears in the history, and can be removed, but the application  don't have a settings button to edit configuration.

EXPECTED RESULT
Show the same settings button that the other applications have.

SOFTWARE/OS VERSIONS
Windows: 
macOS: 
Linux/KDE Plasma: 
(available in About System)
KDE Plasma Version: 
KDE Frameworks Version: 
Qt Version: 

ADDITIONAL INFORMATION
Comment 1 Kai Uwe Broulik 2019-06-18 09:34:32 UTC
Please run
dbus-monitor interface=org.freedesktop.Notifications > ~/somefile.txt
and then spawn a notification and attach the file here. (You might want to remove some private information that could be in there)

Please also provide the name of the name of the desktop file and its contents for the app in question. Likely in /var/lib/snapd/desktop/applications/ or /var/lib/flatpak/exports/share/applications/

I did a fix for Flatpak [1] apps that might help here. It also requires a Frameworks change that hasn't been merged yet. For Snap we could potentially read the BAMF_DESKTOP_FILE_HINT from the app's environment but that stopped working for Spotify recently with which I tested this.

[1] https://cgit.kde.org/plasma-workspace.git/commit/?id=9258ef586324a74d5333faa1429f6a2a80cafadc
Comment 2 Alex Barrero 2019-06-18 12:20:16 UTC
Created attachment 120973 [details]
Slack (flatpak) notification log

alex@laptop:~
└─ $ ls -lh /var/lib/flatpak/exports/share/applications/
lrwxrwxrwx 1 root root   93 jun  5 07:26 com.slack.Slack.desktop -> ../../../app/com.slack.Slack/current/active/export/share/applications/com.slack.Slack.desktop


File content:

[Desktop Entry]
Name=Slack
Comment=Slack Desktop
GenericName=Slack Client for Linux
Exec=/usr/bin/flatpak run --branch=stable --arch=x86_64 --command=slack --file-forwarding com.slack.Slack @@u %U @@
Icon=com.slack.Slack
Type=Application
StartupNotify=true
Categories=GNOME;GTK;Network;InstantMessaging;
MimeType=x-scheme-handler/slack;
X-Desktop-File-Install-Version=0.23
StartupWMClass=Slack
X-Flatpak-RenamedFrom=slack.desktop;
X-Flatpak=com.slack.Slack
Comment 3 Alex Barrero 2019-06-18 12:21:39 UTC
I will try to add later another log file with the notification of the Dropbox app.
Comment 4 Kai Uwe Broulik 2019-06-18 12:40:01 UTC
Thanks for your help!
It sends "Slack" as desktop-entry but the desktop entry is com.slack.Slack.desktop. However it also contains X-Flatpak-RenamedFrom=slack.desktop; which I now take into account.

Considering this fixed with Plasma 5.16.1 (released today) and KDE Frameworks 5.60 (to be released in July)
Comment 5 Kai Uwe Broulik 2019-06-18 13:26:53 UTC
I also made a similar patch for Snaps: https://phabricator.kde.org/D21881
Comment 6 Alex Barrero 2019-06-18 15:06:59 UTC
Created attachment 120978 [details]
Dropbox notification log

/usr/share/applications/dropbox.desktop

File content:

[Desktop Entry]
Name=Dropbox
GenericName=File Synchronizer
Comment=Sync your files across computers and to the web
Exec=dropbox start -i
Terminal=false
Type=Application
Icon=dropbox
Categories=Network;FileTransfer;
StartupNotify=false
Comment 7 Kai Uwe Broulik 2019-06-18 15:13:32 UTC
dropbox doesn't actually send a desktop-entry hint, so there's no way for us to tell what application it is.