Take the 2-minute tour ×
Ask Ubuntu is a question and answer site for Ubuntu users and developers. It's 100% free, no registration required.

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!

share|improve this question
    
Programs like hplip have all their notifications grouped into one scrollable list in my GNOME Shell notification area. Maybe this is a bug? –  WarriorIng64 Oct 31 '11 at 23:25

5 Answers 5

up vote 5 down vote accepted

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

share|improve this answer
    
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. –  user19448 Nov 1 '11 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? –  Manish Sinha Nov 1 '11 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. –  user19448 Mar 2 '12 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 –  Manish Sinha Mar 5 '12 at 10:52

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

share|improve this answer
    
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 '13 at 17:13

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!

share|improve this answer
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 '13 at 11:38

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.

share|improve this answer
    
Looking that solution for my Fedora machine, and it works like a clock. In my personal opinion this is the best and easier answer. –  Rubens Mariuzzo Nov 20 '13 at 23:29
    
Yup, this is the only thing that seems to actually do the job at the moment. –  aychedee May 13 at 20:50

Just press Alt+F2, type the letter R and hit Enter.

This is not solution exactly to clear notifications, but I use it for this purpose. :) What this really does is to restart GNOME Shell. After GNOME Shell restarts, all notifications dissapear.

You don't have to be afraid that your applications will be terminated. This restarts only GNOME Shell. All your (other) programs stay in the same state as before restart (even, for example, movies on YouTube, which restart from moment they were at before you restarted GNOME Shell).

share|improve this answer
2  
This is essentially identical to this previous answer. You've added a bit more information...but you might consider adding that as an edit to that other answer. (Don't make that other answer read exactly the same as this one, just add the information that's missing.) If you choose to do that, you can go ahead and remove this answer. –  Eliah Kagan Oct 6 '12 at 0:26

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.