4

I can see a lot of Elementary Apps in the notification settings, and I know that I can hide the notifications for those apps. But what about the other apps grouped in the category "Other"? Can I hide the notifications for 1 specific app without hiding the rest of "Other" apps?

I specifically want to hide Spotify notifications, but if there is a generic solution this could help a lot of people.

2 Answers 2

13

elementary relies on applications notifying the OS that they want to use notifications by setting a property in their .desktop file. Applications not built/controlled by elementary are not guaranteed to do this

You can add the following line to the bottom of the .desktop file for the application in question and it should show up in the notifications settings so you can configure it like the elementary applications.

X-GNOME-UsesNotifications=true

For example, my /usr/share/applications/spotify.desktop file looks like this:

[Desktop Entry]
Name=Spotify
GenericName=Music Player
Comment=Spotify streaming music client
Icon=spotify-client
Exec=spotify %U
TryExec=spotify
Terminal=false
Type=Application
Categories=Audio;Music;Player;AudioVideo;
MimeType=x-scheme-handler/spotify;
X-GNOME-UsesNotifications=true

And my notification settings now have the Spotify application as a configurable notifications source: enter image description here

This is not guaranteed to be a permanent fix, as the application in question may overwrite its .desktop file during updates, etc...

2
  • 2
    Has there been any changes to this? I can add this, and it does show in the notification settings, however, switching stuff off doesn't change anything.
    – user20763
    Commented Jun 1, 2020 at 10:48
  • I usually copy the desktop files into my /home/arti/.local/share/applications folder so I don't need to mess with sudo and changes are persistent in spite of updates.
    – daGo
    Commented May 8, 2021 at 10:27
0

I guess it does not work for snap apps (?)

1
  • Who downvoted this like a moron? This solution indeed doesn't work for snap spotify. I had to remove spotify.desktop and delete disabled everything in All Settings->Notification->Other
    – Masum
    Commented Aug 8, 2023 at 1:48

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.