I'd like to read a list of messages displayed by notify-osd
from time to time. I'm using 12.04 still, if it matters. Is this possible?
These two questions from 2010 indicate that a log file should exist at ~/.cache/notify-osd.log
. I have no such file, and I'd like to know if this is a bug (in which case this question should be closed) or if this log file depends on another setting (like System Settings -> Privacy)?
I don't care about storing data between reboots. I just want to browse messages from the current session.
EDIT: Two good answers now but I'd like to know if these messages are stored anywhere, (total guess, /tmp? RAM?) for a short period after appearing on the screen. Some sort of buffer must exist as they appear one after another, a few seconds each, even if there are 20-30 notifications over the span of a minute or two.
I failed to mention in my original question that I'm not interested in yet another PPA + indicator or excessive drive writes, I just want to know if it is possible to see the messages for a short time after they appear.
My use case for this is to go back and find what song was played a few minutes ago on a streaming radio station. I have it on as background music, and occasionally a tune sticks in my head after I hear it. I have no way of going back to see what played 1-2 songs ago.
You can install the package indicator-notifications which keeps track of notifcations that you receive. You can install with the following
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.
This is on 13.04 but should work on 12.04 as well.
After carefully looking around (A LOT) I found a code change in 2011 about making
notify-osd
not output by default to the log file because this was used for debugging purposes and wrote to the HDD every time it did. To activate this feature you can do it 2 ways, a temporary method and a more permanent one.Temporary Method
Open the terminal I type the following:
For 64 Bit Systems:
For 32 Bit Systems:
Now you will see the
.cache/notify-osd.log
file and the debug information in it.Permanent Method (WARNING: Global Change)
For a more permanent solution do the following (Global Change. Read the Warning mentioned by Rinzwind below. This will affect everyone and kill the cat!):
Add the following line at the end and save:
Reboot the computer to test.
Permanent Method (User Specific Change)
For a more permanent solution do the following (User specific Change. This will only affect you and the dog. The cat will still survive.):
Add the following line at the end and save:
Reboot the computer to test.
You should see the information start to appear in the
.cache/notify-osd.log
file. For example, this me after disconnecting 2 times my wired connection:GNU nano 2.2.6 File: .cache/notify-osd.log
This will show all notification messages from the time it is started until it is stopped.
Copy and paste it into a terminal window (Ctrl+Alt+T) .
To stop it use Ctrl+C or close the window.
This is effective though non-discriminating and crude but can be finessed to just monitor the exact details desired, of a specific notifying agent by altering the
grep
regular expression"member=Notify\|string"
. The text can then be massaged withsed
,awk
etc. to look good.Penultimately, binding the script to automatically execute with the agent of choice to be monitored would be most useful.
cross reference:
- explicit details in Is there a way to view notification history?