17

I certainly like notifications in 12.04, but depending on the work I do they can be quite distracting.

Is there an official way or a tweak to temporarily deactivate notifications?

UPDATE: To clearify, I am looking for a way to do that in Unity.

lbraun
  • 171
  • 1
  • 5
  • this is a wishlist bug report: https://bugs.launchpad.net/ubuntu/+source/notify-osd/+bug/461058 – fossfreedom Sep 07 '12 at 15:02
  • 2
    Possible duplicate of [Is there a "don't disturb" option to temporarily hide notifications, like on macbooks?](http://askubuntu.com/questions/769948/is-there-a-dont-disturb-option-to-temporarily-hide-notifications-like-on-mac) – orschiro Jan 31 '17 at 06:30
  • 1
    Best solution tested on ubuntu 18.04. https://github.com/pop-os/gnome-shell-extension-do-not-disturb – Muhammad Younus Jun 30 '20 at 18:12

5 Answers5

5

This is how I achieved it

Create a sh file called stopNotification.sh and paste this line

killall -s SIGSTOP notify-osd

Create another sh file and continueNotification.sh and paste following line

killall -s SIGCONT notify-osd

Then goto system settings > keyboard and assign a shortcut for it.

Simple :)

Rahul Prasad
  • 766
  • 1
  • 9
  • 19
  • Thank you for your great solution! I allowed myself to put it on [Github Gist](https://gist.github.com/orschiro/46d75fce983ebf4f5d9aa199cd781606). – orschiro Apr 21 '16 at 07:53
  • 1
    The only problem with this solution is that when I continue them again, I get all the lost notifications back, and this takes hours if I have had them off for, say, a whole backup process... – Filippo Alberto Edoardo Jan 11 '17 at 16:28
4

I don't believe there's an official way, but it's easy enough to disable in the terminal (for presentations, etc.):

  sudo chmod 000 /usr/lib/notify-osd/notify-osd
  killall notify-osd

Afterward, just chmod it back to 755 and notifications will resume.

Relevant: http://brainstorm.ubuntu.com/idea/25512/

Eric
  • 919
  • 6
  • 8
3

Use NoNotification and use don't disturb mode :)

https://launchpad.net/nonotifs

You can save lost notifications to check them later.

sudo add-apt-repository ppa:vlijm/nonotifs
sudo apt-get update
sudo apt-get install nonotifs

NoNotification

z1lV3r
  • 131
  • 2
1

You can disable popup notifications (the bubbles) graphically. Open System Monitor, find the process named notify-osd, right click on it and select stop; if you want notifications back, right click again on the process and click continue.

Notes.

  1. You can test if it's working trying to change audio level from keyboard.
  2. Be sure that there aren't bubbles opened when you stop notify-osd, otherwise they remain locked there.
  3. I don't know why, but when notify-osd is disabled, shortcuts doesn't work well; I mean, all shortcuts (even Ctrl+Alt+L for example). This doesn't always happen and is particularly evident when you use keyboard shortcuts for audio (e.g. to mute, increase or decrease volume, but also to pause or change the music).
tigerjack
  • 2,565
  • 7
  • 24
  • 38
0

Do the following

simply disable process notify-osd from system monitor

Stop Process : To stop popping up notifications

Continue Process : To continue popping up notifications

MohdSohail
  • 11
  • 2
  • 1
    how is this different to the answer provided by tigerjack89 40 minutes earlier? – graham Mar 22 '15 at 09:58
  • I had already typed answer but I had to switch tab and till the time his answer was not there. After sometime when I switched back to this tab then posted my reply. – MohdSohail Mar 22 '15 at 10:15