3

Using the default Ubuntu desktop, I want to stop notifications on an app, but without checking the settings, and instead using the command line. How do I do that?

vanadium
  • 88,010
  • 2
    Whats your Ubuntu version?? – PRATAP Mar 13 '21 at 03:42
  • 1
    Note that my answer below is for the default Ubuntu desktop, since you did not specify the Ubuntu flavor you use. It will be different for Xubuntu or Kubuntu or any other desktop environment. – vanadium Mar 13 '21 at 11:11

1 Answers1

2

As an example, following commands will disable and enable Firefox notifications:

gsettings set org.gnome.desktop.notifications.application:/org/gnome/desktop/notifications/application/firefox/ enable false 
gsettings set org.gnome.desktop.notifications.application:/org/gnome/desktop/notifications/application/firefox/ enable true

To setup your own commands, install dconf-editor, which exposes settings for the entire desktop in a gui. Navigate to /org/gnome/desktop/notifications/application/ to see all applications for which notification settings are in effect. If you move into the firefox folder and then highlight the setting enable, you can press Ctrl+c to copy the path of that setting to the clipboard. Prepend that with gsettings set , and you have created a command line that can set that setting from the terminal.

vanadium
  • 88,010