How to disable (and re-enable) notifications on GNOME Shell version 3.8.4 from the command line?

Solution 1:

Newer gnome-shell (~3.10+):

disable:

gsettings set org.gnome.desktop.notifications show-banners false

enable:

gsettings set org.gnome.desktop.notifications show-banners true

Note that you might need to enable/disable notifications also on a per-app basis, e.g. to disable Nautilus notifications:

gsettings set org.gnome.desktop.notifications.application:/org/gnome/desktop/notifications/application/org-gnome-nautilus/ enable false

and to re-enable them:

gsettings set org.gnome.desktop.notifications.application:/org/gnome/desktop/notifications/application/org-gnome-nautilus/ enable true

Old gnome-shell (<3.8 or 3.10):

disable:

gsettings set org.gnome.desktop.notifications enable false

enable:

gsettings set org.gnome.desktop.notifications enable true