57

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?

1
  • 4
    This is almost 5 years old. Any idea if there're newer solution? Nov 20, 2016 at 11:28

3 Answers 3

26

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 ...

1
  • 2
    Package that baby up and get it into the distro
    – qneill
    Dec 18, 2017 at 17:07
25

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
4
  • 7
    Can this be done without adding another PPA? I think a lot of us avoid doing this wherever possible. Feb 19, 2012 at 13:18
  • I did as you said "sudo add-apt-repository ppa:jconti/recent-notifications sudo apt-get update sudo apt-get install indicator-notifications" then "unity --replace", all commands seemed succesful output, but there is no mailbox icon in the panel. I have had notifications and it's stil not at all appearing. Jul 13, 2020 at 22:56
  • 1
    EDIT: Actually, this might not work because I'm not using Unity at all! Three years ago Ubuntu started using Gnome own desktop. So I'll try to find something analogous for gnome. Jul 13, 2020 at 23:08
  • The most recent release (here in 2023) of recent-notifications is for Ubuntu 14.04 Trusty
    – gene_wood
    Sep 28, 2023 at 16:16
1

How to do this in 18.04 and beyond:

Keyboard shortcut: Cmd-V

Via the mouse: Click on the clock in the top center of the screen.

The notifications appear in the left half of the pane that pops up.

1
  • 2
    The question is how to recover them after they had been dismissed from this piece of UI that you suggest.
    – Levente
    Sep 20, 2022 at 22:12

You must log in to answer this question.

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