[rsyslog] desktop notifications from syslog
Tom Metro
tmetro+rsyslog at gmail.com
Mon May 4 09:49:38 CEST 2009
david at lang.hm wrote:
> Tom Metro wrote:
>> Is there a recommended technique for displaying notifications on a GUI
>> desktop from syslog?
>
> unfortunantly this is going to vary significantly based on which desktop
> and distro you are using.
I'm OK with that, as long as it can be broken into two pieces, with
rsyslog providing some generic mechanism to provide access to the
events, and a separate client that glues rsyslog to the particular GUI.
It seems that libnotify already covers most of the bases within the
Linux universe. According to:
http://www.galago-project.org/specs/notification/
it implements a freedesktop.org standard. I know it is well supported by
GNOME, and Googling shows at least some level of support for it in KDE,
ROX and XFCE.
> one of the changes in Ubuntu 9.04 (just released) was a drastic change in
> the notification daemon and how it works.
Thanks for the tip. I dug up this:
https://wiki.ubuntu.com/JauntyJackalope/TechnicalOverview#New%20style%20for%20notifications%20and%20notification%20preferences
which links to a video demonstrating the new notifications. What is
unclear is whether this is just a new GUI layer over the same code, or
at least something that is still protocol compatible with libnotify.
A forum posting led me to the notify-osd package:
https://launchpad.net/ubuntu/+source/notify-osd
which led me to the design specification:
https://wiki.ubuntu.com/NotifyOSD
According to that, the new system is compliant (or at least intended to
be) with the freedesktop.org standard. The most notable difference is
that these new "bubble" notifications are shown for a limited duration,
as chosen by notify-osd, but if the client app. specifies infinite
duration, it goes into a fall-back mode and shows a traditional alert
box. In that regards, seems like a step backwards from
notification-daemon, given that alert boxes are less visually appealing.
Of course they might jazz up the alert boxes at a later time.
(In my prototype I've been using an infinite display duration, with the
rationale that the kinds of messages being shown require user attention
and should not be missed if the user isn't at the computer when they occur.)
The closest example they have in the spec is the kerneloops one:
https://wiki.ubuntu.com/NotifyOSD#kerneloops
and their plan is to migrate from using the (old style) notification
bubble (looks like a system tray bubble, even though I don't think there
is a corresponding tray icon) to a traditional alert box (again, seems
like a step backwards, but I guess they're trying to increase
consistency and reduce visual variety in notifications).
By using an infinite display duration via libnotify, according to their
spec, it'll show an alert box, so this new usage will be consistent with
the kerneloops use case.
(Their spec addresses the issue of avoiding accidental key presses that
might dismiss a pop-up notification, and this was given as a rationale
for bubbles not having any clickable buttons. But I didn't see how they
addressed this problem for alert boxes.)
Having the notifications look nice would be good, but obviously the
important thing is just getting them displayed. The bottom line looks
like an app. that works with libnotify under Ubuntu 8.10 or earlier will
continue to work with 9.04.
-Tom
More information about the rsyslog
mailing list