24

I have an application that went completely crazy and sent (it seems like) hundreds of notifications to the notification daemon. Now I've been getting notification bubbles for the last few minutes and it is getting annoying.

How can I make them stop without logging off or rebooting?

Nathan Osman
  • 32,155

2 Answers2

32

I have a .desktop file that I use to kill the notifications.

[Desktop Entry]
Name=Notify Kill
Comment=Kill those pesky notifications!
Exec=killall notify-osd
Icon=utilities-terminal
Type=Application
StartupNotify=true
OnlyShowIn=GNOME;Unity;

Toss that as notify-kill.desktop in ~/.local/share/applications, wait a minute and it will pop up in your Unity dash.

To use, just open the dash and search for kill or notify, and it will clear your notifications!

jrg
  • 60,611
  • Excellent - that's a very clever way of doing it. I'm also glad I'm not the only one doing it :P – Nathan Osman Jun 25 '12 at 18:10
  • 1
    This is great! There's only one tiny problem: I get the spinning circle cursor for around 15 seconds when hovering over the dash after I click on the desktop entry (using 15.04). I can still click and execute stuff but it would be cool to get my pointer cursor back. Is there any way around this? – rgajrawala Jul 30 '15 at 16:24
0

This solution eliminates all OSD notifications (on screen display noise) is quoted from Close button on notify-osd?

dbus-monitor "interface='org.freedesktop.Notifications'" | \
grep --line-buffered "member=Notify" | \
sed -u -e  's/.*/killall notify-osd/g' | \
bash

This can be run in a terminal or as a background task - stop it and pop-up graffiti resumes.

To run it, copy and paste it into a terminal window (opened via ctrl+alt+T). Close the window or type type ctrl+C to stop it.

Cross refs.:

Pablo Bianchi
  • 15,657