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.

If I walk away from my PC, then there is a good chance I might miss certain notifications. I've seen in KDE that notifications get stored and stacked until you click them (or whatever).

Unless I'm missing something, Ubuntu doesn't seem to have a history of clickable notifications.

Is there a way to do this?

share|improve this question
    
Great question. –  Gigili Feb 19 '12 at 12:01

2 Answers 2

up vote 15 down vote accepted

Take Recent Notifications.

screenshot recent notifications

In a terminal run:

sudo add-apt-repository ppa:jconti/recent-notifications
sudo apt-get update
sudo apt-get install indicator-notifications

Alternatively you could download the package directly on the launchpad-site. For Ubuntu 11.10 Oneiric on an i386-machine choose indicator-notifications_0.1.4-2~ppa~oneiric_i386.deb. (Don't install recent-notifications)

After installing run Alt+F2 unity --replace.

You will find a little mailbox in the panel:

recent notifications in panel

It is possible to align the icon to your desktop theme, i. e. when you use Faenza:

mkdir ~/.icons/Faenza/status/scalable
cp /usr/share/icons/Faenza/status/scalable/user-available-symbolic.svg ~/.icons/Faenza/status/scalable/indicator-notification-unread.svg
cp /usr/share/icons/Faenza/status/scalable/user-away-symbolic.svg ~/.icons/Faenza/status/scalable/indicator-notification-read.svg

new Faenza icons

To stop it you need to unistall it:

sudo apt-get purge indicator-notifications

Then again run Alt+F2 unity --replace.

To remove the ppa run:

sudo add-apt-repository -r ppa:jconti/recent-notifications
share|improve this answer
3  
Can this be done without adding another PPA? I think a lot of us avoid doing this wherever possible. –  Tom Brossman Feb 19 '12 at 13:18
    
And how would this be uninstalled? –  Gonzoza Feb 19 '12 at 13:41
    
Nice work, thanks for the edits. –  Tom Brossman Feb 19 '12 at 13:52
1  
I can't get it to work. "sudo aptitude update" throws an error, as does the third line of code. –  Gonzoza Feb 19 '12 at 13:55
    
Yes, that worked, thanks. –  Gonzoza Feb 23 '12 at 8:17

The comment linked here, Is there a way to view notification history?, asked:

Can this be done without adding another PPA?

Yes


Open two terminal windows (Ctrl+Alt+T+T). The extra window is needed only for test purposes.


Monitor notifications in one of the terminal windows with:

dbus-monitor "interface='org.freedesktop.Notifications'"    |     \
grep --line-buffered  "member=Notify\|string"

(to stop it, close the window or type Ctrl+C)

Note that running this script only shows those notifications occurring from the time it is started and must be run prior to the processes and aps. for which the history is desired. If the terminal window has an insufficient scrollback size either change the scrollback lines in Edit > Profile Preferences > Scrolling or record the history as described next.

To record the output in a permanent log just redirect it to a file by adding >>path/filename.ext to the end of the grep line. To record and view the notices append | tee >>path/filename.ext to the grep line.


Test it.

  1. Using Pangolin 12.04 Live SD/USB
  2. Turn wireless networking off & on.
  3. Use the other terminal window to make some other notifications with:
    for i in {0..100..20};
         do
               killall notify-osd;
               notify-send "testing $i" $i;
               sleep 0.5;
         done

Results

Judicious use of grep and sed etc. can pretty print the notifications that are crudely shown below for these monitored examples. The text that matches the graffiti in the notification pop-up bubbles is shown in bold. The two strings preceding those are the ap. making the graffiti (ie. "NetworkManager" or "notify-send") and the name of the icon, if any, (ie. "notification-network-wireless-disconnected") to show in the pop-up bubble.

   string ":1.380"
method call sender=:1.14 -> dest=:1.379 serial=8691
                path=/org/freedesktop/Notifications;
                         interface=org.freedesktop.Notifications; member=Notify
   string "NetworkManager"
   string "notification-network-wireless-disconnected"
   string "MissingLink"
   string "Disconnected - you are now offline"
         string "urgency"
         string "transient"
method call sender=:1.14 -> dest=:1.379 serial=8782 
                path=/org/freedesktop/Notifications;
                         interface=org.freedesktop.Notifications; member=Notify
   string "NetworkManager"
   string "notification-network-wireless-full"
   string "MissingLink"
   string "Connection Established"
         string "urgency"
         string "transient"
method call sender=:1.386 -> dest=:1.389 serial=7 
                path=/org/freedesktop/Notifications;
                         interface=org.freedesktop.Notifications; member=Notify
   string "notify-send"
   string ""
   string "testing 0"
   string "0"
         string "urgency"

. . .

    method call sender=:1.426 -> dest=:1.429 serial=7
                path=/org/freedesktop/Notifications;
                         interface=org.freedesktop.Notifications; member=Notify
       string "notify-send"
       string ""
       string "testing 80"
       string "80"
             string "urgency"
    method call sender=:1.430 -> dest=:1.433 serial=7
                path=/org/freedesktop/Notifications;
                         interface=org.freedesktop.Notifications; member=Notify
       string "notify-send"
       string ""
       string "testing 100"
       string "100"
             string "urgency"

cross references:
... to be done ...

share|improve this answer

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.