4

I am looking for a way to view all the entries in indicator-notifications. I have it installed already and running. By default, it shows just five recent notifications even when you have more than five in a 'list' somewhere.

enter image description here

Like in the screenshot above, how can I see all the 11 notifications at once?

Parto
  • 15,325
  • 24
  • 86
  • 117
  • You can show older notifications by clicking the visible ones which deletes them. I would have liked to have some sort of scrolling, but menus are not really well-suited to the task. It would be possible to make the maximum number of visible notifications unlimited, but the menu scrolling in gtk3 is horribly bugged and often the handles get stuck under the panel. That's why I currently limited it from 1-10. – Jason Conti Mar 23 '14 at 18:41

1 Answers1

3

Solution for showing more notifications in the bubble

For Ubuntu 13.04 and up. If you interpret OPs question as "I want more notifications to appear",

sudo nano /usr/share/glib-2.0/schemas/net.launchpad.indicator.notifications.gschema.xml

Look for the lines that say

<range min="1" max = "10"/> <default>5<default>

and then edit the <default>5<default> and `<range min="1" max = "10"/> to whatever you need.

For the curious

In the debian for the software, it has a few folders that it installs into. It installs things into /usr/share and /usr/lib. Library files are in .so so I can't edit anything in there. Navigating through /usr/share, I found the doc folder which is just debian package info, pixmaps which are the pngs for the icons on the notification bar, and then there was glib-2.0 which conveniently had an easy to read xml file. This is where you edit the variable to show whatever value of notifications you want.

Solution for Saving the Notifications to File

If you interpret OPs question as "I want to see my notification history", this is a general solution, you can do what you want with the log produced, IE let it accumulate, have it clear on shutdown, etc. Indicator-notifications is based on notify-osd as noted in their notes. Indicator-notifications is not necessary for this solution.

In sudo nano /etc/environment add LOG=1.

Reboot.

You notifications will now be stored in/home/$USER/.cache/notify-osd.log

Edit: Global Variables may be a bad idea to change because it is unknown what other programs use that variable. Add LOG=1 to your local .bashrc instead.

Mr.Lee
  • 891
  • Thanks Mr. Lee but I don't want to change the number of notifications displayed. I want to like open up all of them in an external software and just view them. Something else: I don't even have a net.launchpad.indicator.notifications.gschema.xml file. Running Ubuntu 12.04. – Parto Mar 23 '14 at 06:05
  • This doesn't work for Ubuntu 12.04. It works for 13.04 and up. Also, it wasn't clear what you were looking for, you should update to clarify. – Mr.Lee Mar 23 '14 at 06:34
  • Updated for other interpretation. – Mr.Lee Mar 23 '14 at 07:32
  • Mr. Lee, won't enabling LOG=1 enable logs in more than just the notifications? I don't like the look of that, plus it's in the global environment file. – Parto Mar 23 '14 at 07:47
  • This is true. How about setting it as a local variable for the user in the .bashrc? – Mr.Lee Mar 23 '14 at 07:51
  • I found another question almost similar to mine: http://askubuntu.com/questions/288348/how-can-i-read-notifyosd-messages-after-they-are-displayed I will set it in the .bashrc file just for me. Thanks alot. – Parto Mar 23 '14 at 07:53
  • Mr. Lee, please edit your answer and include the 'setting it in .bashrc file' part. I think that is better than in the global environment file. I have also raised a question about setting it on /ect/environment – Parto Mar 23 '14 at 08:09
  • 1
    @AvatarParto Alternatively you could set it only in notify-osd's environment in /usr/share/dbus-1/services/org.freedesktop.Notifications.service by replacing the Exec line with Exec=/usr/bin/env LOG=1 /usr/lib/x86_64-linux-gnu/notify-osd, though that will get blown away when notify-osd is updated. – Jason Conti Mar 23 '14 at 19:05
  • 1
    Re: saving in a file, it seems that notify-osd is not part of Ubuntu any more. I guess it was part of the old Unity approach. Now d-feet shows that org.freedesktop.Notifications on the Session Bus is associated with gnome-shell itself. And the notification I wanted to track down as an obvious one to log and get a timestamp for (ephemeral warnings that The volume “Filesystem root” has only xxx MB disk space remaining!) came from 1.49 which is gsd-housekeeping on the Session Bus. So now the question for gnome-shell is how to log notifications, like notify-osd did, I guess? – nealmcb Nov 04 '18 at 03:11