Logging Notification Messages in Ubuntu

Ubuntu contains a nice notification system to talk to the user about noteworthy events. However when the message dissappears, by default, it is gone. Often I am busy with something else when the notification pops up and I pay little notice. Then somewhere in my brain, something gets triggered by a word, and by the time I focus on the message to really read it, the message disappears. Some of these appear after booting or logging in, so it is not trivial to redisplay them. Then I really need a system for logging notification messages for reading what I missed.

Ideally there was a scroll back buffer in the notification feature. Maybe there is, but I didn’t find it.

Standard Notification Logging

The developers provided a log in *~/.cache/notify-osd.log*. (see
[[https://wiki.ubuntu.com/NotifyOSD][NotifyOSD page an the ubuntu wiki]]) for logging notification messages. So this used to be a moot point as
a quick

$ tail ~/.cache/notify-osd

gave me what I needed.

However somewhere between 12.04 and 13.04 the default behavior was
changed to no longer log to this file by default. My last entry was
from December 2012. It was considered as a developer feature and was
disabled for the general public, but controllable using an environment
variable : LOG=1.

To enable this globally, edit */etc/environment* and add


However, since this is such a vague variable, I guess that this will
enable logging in more than just *notify-osd*. I am fine with this
(at least until my disk runs out).

The wiki, which actually contains a design document rather than
documentation, makes no mention of it. It is also not very logical as
the file is reset when logging in, so it should never pose a threat
to the disk space. In any case, I dropped a small note in the wiki to
point users in the right direction.

Logging Notifications with an App

There is also an app for that. You can install the package
indicator-notifications which keeps track of notifcations that you
receive. You can install with the following

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

You’ll have to log out and log back in. It shows up as a mailbox in
the top panel and turns green when you get new messages.

For more info about logging notifications see http://askubuntu.com/questions/288348/how-can-i-read-notifyosd-messages-after-they-are-displayed