26

I use Jupiter as a power manager. Now I get a good number of notifications from it. I do not have problem with the fact that I get all these notifications.

I do however, want to be able to clear all gnome shell notifications with a few clicks. Currently, my entire bottom edge of the screen is filled with notifications and I do not wish to clear each item one by one.

So my question is, how do I clear these notifications? If this is not possible in the ui, is it possible to write an extension to do it? Where should I suggest this feature to gnome developers? Gnome forums are almost dead now, the administrator has not activated my created account since 5 days!

1
  • Programs like hplip have all their notifications grouped into one scrollable list in my GNOME Shell notification area. Maybe this is a bug? Oct 31, 2011 at 23:25

4 Answers 4

25

Shamelessly using this workaround from the Fedora forums here.

You can reset the gnome-shell by typing Alt+F2, entering r and hitting enter. This resets/restarts the GNOME Shell and so clears all notifications.

4
  • Looking that solution for my Fedora machine, and it works like a clock. In my personal opinion this is the best and easier answer. Nov 20, 2013 at 23:29
  • Yup, this is the only thing that seems to actually do the job at the moment.
    – aychedee
    May 13, 2014 at 20:50
  • This removed all configuration from my extensions. I had to reconfigure all again. None of them was any longer activated. Sep 22, 2015 at 7:13
  • excellent, to unfreeze the shell!
    – cat
    Aug 16, 2018 at 10:03
17

If this is still bothering you, I've found a workaround for using jupiter. The trick is to add the transient hint to the notifications that jupter sends.

For me (installed jupiter via webupd8 ppa on 11.10), the appropriate file to modify is /usr/lib/jupiter/scripts/notify

For my setup, the change I had to make was to add --hint int:transient:1 to every call of notify-send within the script. Thus, my jupiter notify script changed from:

    function notify {
      if [ ! "$NO_NOTIFY" = "1" ]; then
        ICON=$2
        MESSAGE=$1
        if [ "$DISTRIB_RELEASE" = "9.10" ]; then
          DISPLAY=:0.0 /usr/bin/notify-send -i $ICON -t 1500 "$MESSAGE" 2>/dev/null
        else
          USER=$(who | sed -n '/ (:0[\.0]*)$\| :0 /{s/ .*//p;q}')
          USERCNT=$(who | wc -l)
          if [ ! "$(whoami)" = "$USER" ]; then
            if [ ! "$USERCNT" -lt 1 ]; then
               su $USER -l -c "DISPLAY=:0.0 /usr/bin/notify-send -i $ICON -t 700 \"$MESSAGE\" 2>/dev/null"
            fi
        else
            if [ ! "$USERCNT" -lt 1 ]; then
             /usr/bin/notify-send -i $ICON -t 700 "$MESSAGE" 2>/dev/null
            fi
          fi
        fi
      fi
    }

to:

    function notify {
      if [ ! "$NO_NOTIFY" = "1" ]; then
        ICON=$2
        MESSAGE=$1
        if [ "$DISTRIB_RELEASE" = "9.10" ]; then
          DISPLAY=:0.0 /usr/bin/notify-send --hint int:transient:1 -i $ICON -t 1500 "$MESSAGE" 2>/dev/null
        else
          USER=$(who | sed -n '/ (:0[\.0]*)$\| :0 /{s/ .*//p;q}')
          USERCNT=$(who | wc -l)
          if [ ! "$(whoami)" = "$USER" ]; then
            if [ ! "$USERCNT" -lt 1 ]; then
               su $USER -l -c "DISPLAY=:0.0 /usr/bin/notify-send --hint int:transient:1 -i $ICON -t 700 \"$MESSAGE\" 2>/dev/null"
            fi
        else
            if [ ! "$USERCNT" -lt 1 ]; then
             /usr/bin/notify-send --hint int:transient:1 -i $ICON -t 700 "$MESSAGE" 2>/dev/null
            fi
          fi
        fi
      fi
    }

This isn't really a direct answer to your question, since this won't clear all notifications, but it will at least prevent the jupiter ones from stacking up.

Hope this helps!

1
  • 1
    --hint int:transient:1 is the bee's knees! Thank you so much. It fixed my issues with notify-send (in my own admin scripts) as well.
    – sehe
    Jul 27, 2013 at 11:38
5

As far as I know there is currently no way of clearing all the notifications in gnome-shell. Is your bottom screen like this? (not Firefox, but any applications flooding the lower panel)

enter image description here

I tried searching all the design documents on wiki and still cannot find any design or spec for clearing all the notification.

You can request this feature by opening a bug report here


Extra Info: Clearing in Unity

This is one use case where passive notifications with App Indicator makes a lot of sense. You don't need to be bothered with notifications pilings up. Those notifications which need your attention show in app indicator and can be cleared

enter image description here

4
  • Hi, it seems that others have posted about the same issue on the forums. thanks for giving me the link. well, i really prefer gnome shell's message tray system and the fact that i can chat without shifting to another application. having said that, i think notifications should be able to be dismissed easily.
    – aatish
    Nov 1, 2011 at 15:43
  • @user19448 I think chatting part is not related to notifications as such in this special case. That is more of deep integration of empathy in gnome-shell. If there was no chat integration, would you have still preferred the gnome-shell message tray system? Nov 1, 2011 at 18:30
  • Whoa I am replying way too late. No, not really. Chat integration feature is something that I really appreciate in Gnome Shell. Compare that to Unity, where everytime someone says something I need to click a small button and carefully(without losing focus of the popup menu) go down and select an item to focus the chat window. What is the point of having such an indicator menu when it is cheaper (in time) to press alt tab and find the chat window? Chat is not an action in itself, it is a supplemental activity to whatever you are doing and I think Gnome Shell really gets this idea.
    – aatish
    Mar 2, 2012 at 17:37
  • @user19448 "go down and select an item to focus the chat window" --> You seem to miss what that Messaging Menu is for. It is for those notifications which should not steal your focus while you are working. It is a notification that something important awaits your time. Messaging Menu is not about action itself, but an indication. You have misunderstood Messaging Menu. Secondly comparing integrated chat and Messaging Menu is comparing apples to oranges Mar 5, 2012 at 10:52
-1

Click on any notification and it will disappear unless it has menu of its own (informational versus minimized app).

1
  • Right, the problem comes when you have 150 notifications. Nobody really wants to click 150 times to reset all of them. In my case I have google drive sync that notifies me every time it synced something. If i'm working on a file and it's saving, I'm constantly getting notifications of status changes.
    – csgeek
    Dec 31, 2013 at 17:13

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .