Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > comp.os.linux.misc > #1149 > unrolled thread

linux: desktop notification library?

Started byRui Maciel <rui.maciel@gmail.com>
First post2011-05-18 13:29 +0100
Last post2011-05-20 12:08 +0100
Articles 13 — 6 participants

Back to article view | Back to comp.os.linux.misc


Contents

  linux: desktop notification library? Rui Maciel <rui.maciel@gmail.com> - 2011-05-18 13:29 +0100
    Re: linux: desktop notification library? Robert Heller <heller@deepsoft.com> - 2011-05-18 10:33 -0500
      Re: linux: desktop notification library? Rainer Weikusat <rweikusat@mssgmbh.com> - 2011-05-18 16:53 +0100
      Re: linux: desktop notification library? Aragorn <aragorn@chatfactory.invalid> - 2011-05-18 18:02 +0200
        Re: linux: desktop notification library? scott@slp53.sl.home (Scott Lurndal) - 2011-05-18 16:43 +0000
        Re: linux: desktop notification library? Robert Heller <heller@deepsoft.com> - 2011-05-18 11:56 -0500
      Re: linux: desktop notification library? Tim Watts <tw@dionic.net> - 2011-05-18 18:23 +0100
        Re: linux: desktop notification library? Rui Maciel <rui.maciel@gmail.com> - 2011-05-18 19:21 +0100
          Re: linux: desktop notification library? Robert Heller <heller@deepsoft.com> - 2011-05-18 14:11 -0500
            Re: linux: desktop notification library? Rui Maciel <rui.maciel@gmail.com> - 2011-05-20 12:03 +0100
              Re: linux: desktop notification library? Robert Heller <heller@deepsoft.com> - 2011-05-20 08:08 -0500
          Re: linux: desktop notification library? Tim Watts <tw@dionic.net> - 2011-05-18 20:28 +0100
            Re: linux: desktop notification library? Rui Maciel <rui.maciel@gmail.com> - 2011-05-20 12:08 +0100

#1149 — linux: desktop notification library?

FromRui Maciel <rui.maciel@gmail.com>
Date2011-05-18 13:29 +0100
Subjectlinux: desktop notification library?
Message-ID<4dd3bba1$0$31206$a729d347@news.telepac.pt>
Is there any library that handles desktop notification that is independent 
of any desktop environment?  I've stumbled on libnotify[1] but it appear 
to be tied to GNOME.


Thanks in advance,
Rui Maciel


[1] http://developer.gnome.org/libnotify/

[toc] | [next] | [standalone]


#1151

FromRobert Heller <heller@deepsoft.com>
Date2011-05-18 10:33 -0500
Message-ID<VtudnXqugtUhe07QnZ2dnUVZ_jGdnZ2d@posted.localnet>
In reply to#1149
At Wed, 18 May 2011 13:29:22 +0100 Rui Maciel <rui.maciel@gmail.com> wrote:

> 
> Is there any library that handles desktop notification that is independent 
> of any desktop environment?  I've stumbled on libnotify[1] but it appear 
> to be tied to GNOME.

There isn't one.  One of the *great* things about Linux and UNIX, in
addition to the fact that users are not tied to one specific desktop
environment (or to using *any* 'desktop environment' at all).

> 
> 
> Thanks in advance,
> Rui Maciel
> 
> 
> [1] http://developer.gnome.org/libnotify/
>               

-- 
Robert Heller             -- 978-544-6933 / heller@deepsoft.com
Deepwoods Software        -- http://www.deepsoft.com/
()  ascii ribbon campaign -- against html e-mail
/\  www.asciiribbon.org   -- against proprietary attachments


                  

[toc] | [prev] | [next] | [standalone]


#1152

FromRainer Weikusat <rweikusat@mssgmbh.com>
Date2011-05-18 16:53 +0100
Message-ID<8739kc9f8s.fsf@sapphire.mobileactivedefense.com>
In reply to#1151
Robert Heller <heller@deepsoft.com> writes:
> At Wed, 18 May 2011 13:29:22 +0100 Rui Maciel <rui.maciel@gmail.com> wrote:
>> Is there any library that handles desktop notification that is independent 
>> of any desktop environment?  I've stumbled on libnotify[1] but it appear 
>> to be tied to GNOME.
>
> There isn't one.  One of the *great* things about Linux and UNIX, in
> addition to the fact that users are not tied to one specific desktop
> environment (or to using *any* 'desktop environment' at all).

In line with a historical joke: This will be fixed in some future
Ubuntu release.

[toc] | [prev] | [next] | [standalone]


#1153

FromAragorn <aragorn@chatfactory.invalid>
Date2011-05-18 18:02 +0200
Message-ID<ir0qil$ho7$94@dont-email.me>
In reply to#1151
On Wednesday 18 May 2011 17:33 in comp.os.linux.misc, somebody
identifying as Robert Heller wrote...

> At Wed, 18 May 2011 13:29:22 +0100 Rui Maciel <rui.maciel@gmail.com>
> wrote:
> 
>> Is there any library that handles desktop notification that is
>> independent of any desktop environment?  I've stumbled on
>> libnotify[1] but it appear to be tied to GNOME.
> 
> There isn't one.  One of the *great* things about Linux and UNIX, in
> addition to the fact that users are not tied to one specific desktop
> environment (or to using *any* 'desktop environment' at all).
 
I'm not a programmer so I don't know what library it calls, but on my
system here I have a tool, "/usr/bin/xmessage", which allows for a
message to be sent to an X11 environment, and it appears to be using
different libraries, because its appearance does not resemble Gnome,
nor KDE - which is what I'm running.  It appears to have somewhat of a
Motif/Lesstif style.

The xmessage utility has a man page too, but it doesn't say what
libraries it involves - at least, not insofar as I could ascertain, but
I've only skimmed it.

-- 
*Aragorn*
(registered GNU/Linux user #223157)

[toc] | [prev] | [next] | [standalone]


#1157

Fromscott@slp53.sl.home (Scott Lurndal)
Date2011-05-18 16:43 +0000
Message-ID<oGSAp.658$Yp4.167@news.usenetserver.com>
In reply to#1153
Aragorn <aragorn@chatfactory.invalid> writes:
>On Wednesday 18 May 2011 17:33 in comp.os.linux.misc, somebody
>identifying as Robert Heller wrote...
>
>> At Wed, 18 May 2011 13:29:22 +0100 Rui Maciel <rui.maciel@gmail.com>
>> wrote:
>> 
>>> Is there any library that handles desktop notification that is
>>> independent of any desktop environment?  I've stumbled on
>>> libnotify[1] but it appear to be tied to GNOME.
>> 
>> There isn't one.  One of the *great* things about Linux and UNIX, in
>> addition to the fact that users are not tied to one specific desktop
>> environment (or to using *any* 'desktop environment' at all).
> 
>I'm not a programmer so I don't know what library it calls, but on my
>system here I have a tool, "/usr/bin/xmessage", which allows for a
>message to be sent to an X11 environment, and it appears to be using
>different libraries, because its appearance does not resemble Gnome,
>nor KDE - which is what I'm running.  It appears to have somewhat of a
>Motif/Lesstif style

xmessage is original X11, it uses the Athena Widgets library which is
part of the core X11 distribution.
>
>The xmessage utility has a man page too, but it doesn't say what
>libraries it involves - at least, not insofar as I could ascertain, but
>I've only skimmed it.

# ldd /usr/bin/xmessage
        linux-vdso.so.1 =>  (0x00007fffe64fc000)
        libXaw.so.7 => /usr/lib/libXaw.so.7 (0x00007fe6afcb1000)
        libXt.so.6 => /usr/lib/libXt.so.6 (0x00007fe6afa4b000)
        libXmu.so.6 => /usr/lib/libXmu.so.6 (0x00007fe6af832000)
        libX11.so.6 => /usr/lib/libX11.so.6 (0x00007fe6af4fc000)
        libSM.so.6 => /usr/lib/libSM.so.6 (0x00007fe6af2f3000)
        libc.so.6 => /lib/libc.so.6 (0x00007fe6aef83000)
        libXext.so.6 => /usr/lib/libXext.so.6 (0x00007fe6aed71000)
        libXpm.so.4 => /usr/lib/libXpm.so.4 (0x00007fe6aeb60000)
        libxcb.so.1 => /usr/lib/libxcb.so.1 (0x00007fe6ae944000)
        libdl.so.2 => /lib/libdl.so.2 (0x00007fe6ae740000)
        libICE.so.6 => /usr/lib/libICE.so.6 (0x00007fe6ae525000)
        libuuid.so.1 => /lib/libuuid.so.1 (0x00007fe6ae320000)
        /lib64/ld-linux-x86-64.so.2 (0x00007fe6aff20000)
        libXau.so.6 => /usr/lib/libXau.so.6 (0x00007fe6ae11d000)
        libXdmcp.so.6 => /usr/lib/libXdmcp.so.6 (0x00007fe6adf18000)

These are all core X11R6 (x.org) libraries.

scott

[toc] | [prev] | [next] | [standalone]


#1159

FromRobert Heller <heller@deepsoft.com>
Date2011-05-18 11:56 -0500
Message-ID<8vSdnfnkJrC_Z07QnZ2dnUVZ_rKdnZ2d@posted.localnet>
In reply to#1153
At Wed, 18 May 2011 18:02:29 +0200 Aragorn <aragorn@chatfactory.invalid> wrote:

> 
> On Wednesday 18 May 2011 17:33 in comp.os.linux.misc, somebody
> identifying as Robert Heller wrote...
> 
> > At Wed, 18 May 2011 13:29:22 +0100 Rui Maciel <rui.maciel@gmail.com>
> > wrote:
> > 
> >> Is there any library that handles desktop notification that is
> >> independent of any desktop environment?  I've stumbled on
> >> libnotify[1] but it appear to be tied to GNOME.
> > 
> > There isn't one.  One of the *great* things about Linux and UNIX, in
> > addition to the fact that users are not tied to one specific desktop
> > environment (or to using *any* 'desktop environment' at all).
>  
> I'm not a programmer so I don't know what library it calls, but on my
> system here I have a tool, "/usr/bin/xmessage", which allows for a
> message to be sent to an X11 environment, and it appears to be using
> different libraries, because its appearance does not resemble Gnome,
> nor KDE - which is what I'm running.  It appears to have somewhat of a
> Motif/Lesstif style.
> 
> The xmessage utility has a man page too, but it doesn't say what
> libraries it involves - at least, not insofar as I could ascertain, but
> I've only skimmed it.

It is just a simple X11 program that displays a small dialog box.  It
does not use any 'messaging' or 'notification' interface as such.  It
is useful for things like mostly non-interactive shell scripts to pop
up little messages or even simple dialog boxes, without the need for
the programmer to have to write a whole X11 program in C (generally a
non-trivial task), Perl/TK, Python/Tk, or Tcl/Tk.  It is somewhere in
the realm of echo/read or dialog in non-GUI environments. It is not
Motif/Lesstif, it is really old school XAW (original 'flat' X11 Toolkit
Widgets).


-- 
Robert Heller             -- 978-544-6933 / heller@deepsoft.com
Deepwoods Software        -- http://www.deepsoft.com/
()  ascii ribbon campaign -- against html e-mail
/\  www.asciiribbon.org   -- against proprietary attachments


                                                                                                               

[toc] | [prev] | [next] | [standalone]


#1161

FromTim Watts <tw@dionic.net>
Date2011-05-18 18:23 +0100
Message-ID<8ubda8-mch.ln1@squidward.dionic.net>
In reply to#1151
Robert Heller wrote:

> At Wed, 18 May 2011 13:29:22 +0100 Rui Maciel <rui.maciel@gmail.com>
> wrote:
> 
>> 
>> Is there any library that handles desktop notification that is
>> independent
>> of any desktop environment?  I've stumbled on libnotify[1] but it appear
>> to be tied to GNOME.
> 
> There isn't one.  One of the *great* things about Linux and UNIX, in
> addition to the fact that users are not tied to one specific desktop
> environment (or to using *any* 'desktop environment' at all).
> 

Yep. I *think* sending libnotify events can be decoupled from the choice of 
desktop - have a vague feeling I have used the same client (bit of perl 
using Gtk2::Notify) to signal notifactions which were handled by both KDE 
and Gnome.

The handling may not be "native" but both seemed to sport applets that would 
handle such messages. The applets are different and look different, but the 
functionality is common.

So notify is probably the best bet. In theory you can always knock up a 
cheap and cheerful X11 based one for the usage case where a heavier desktop 
is undesireable. Even a non gui app that spews them to STDOUT and run it in 
an xterm would be feasible.

libnotify itself is fairly lightwieght:

dpkg -s libnotify1
<snip>
Depends: libc6 (>= 2.7), libdbus-glib-1-2 (>= 0.78), libglib2.0-0 (>= 
2.16.0), libgtk2.0-0 (>= 2.18.0)

So I don't see a serious problem there.

-- 
Tim Watts

[toc] | [prev] | [next] | [standalone]


#1163

FromRui Maciel <rui.maciel@gmail.com>
Date2011-05-18 19:21 +0100
Message-ID<4dd40e34$0$31200$a729d347@news.telepac.pt>
In reply to#1161
Tim Watts wrote:

> libnotify itself is fairly lightwieght:
> 
> dpkg -s libnotify1
> <snip>
> Depends: libc6 (>= 2.7), libdbus-glib-1-2 (>= 0.78), libglib2.0-0 (>=
> 2.16.0), libgtk2.0-0 (>= 2.18.0)
> 
> So I don't see a serious problem there.

Being forced to include a hand full of libraries, including libgtk2.0, 
isn't exactly being lightweight, even more when considering that a project 
is forced to depend on those packages just to be able to trigger DE-
agnostic notification events.  

If you are developing a GTK project then that's acceptable.  If you are 
developing a project based on some other GUI library then those 
requirements become a bit unacceptable.


Rui Maciel

[toc] | [prev] | [next] | [standalone]


#1164

FromRobert Heller <heller@deepsoft.com>
Date2011-05-18 14:11 -0500
Message-ID<Qv-dnZtb4ZtOhEnQnZ2dnUVZ_sydnZ2d@posted.localnet>
In reply to#1163
At Wed, 18 May 2011 19:21:43 +0100 Rui Maciel <rui.maciel@gmail.com> wrote:

> 
> Tim Watts wrote:
> 
> > libnotify itself is fairly lightwieght:
> > 
> > dpkg -s libnotify1
> > <snip>
> > Depends: libc6 (>= 2.7), libdbus-glib-1-2 (>= 0.78), libglib2.0-0 (>=
> > 2.16.0), libgtk2.0-0 (>= 2.18.0)
> > 
> > So I don't see a serious problem there.
> 
> Being forced to include a hand full of libraries, including libgtk2.0, 
> isn't exactly being lightweight, even more when considering that a project 
> is forced to depend on those packages just to be able to trigger DE-
> agnostic notification events.  
> 
> If you are developing a GTK project then that's acceptable.  If you are 
> developing a project based on some other GUI library then those 
> requirements become a bit unacceptable.

What *exactly* are you trying to acomplish here?  If you are just
sending system diagnostic messages, you should just use the same
functions as powerd or shutdown use.  I know, these don't do anything
WRT the GUI or Desktop Environment, but many Desktop Environments have
the means of intercepting console alert messages and popping them up on
the screen within the context of the Desktop Environments (eg system
alert applets or some such).

> 
> 
> Rui Maciel
>                                             

-- 
Robert Heller             -- 978-544-6933 / heller@deepsoft.com
Deepwoods Software        -- http://www.deepsoft.com/
()  ascii ribbon campaign -- against html e-mail
/\  www.asciiribbon.org   -- against proprietary attachments


                                                                    

[toc] | [prev] | [next] | [standalone]


#1184

FromRui Maciel <rui.maciel@gmail.com>
Date2011-05-20 12:03 +0100
Message-ID<4dd64a78$0$23414$a729d347@news.telepac.pt>
In reply to#1164
Robert Heller wrote:

> What *exactly* are you trying to acomplish here?  

As I've written in the post that started this thread, I was looking for a 
library that handled desktop notifications which was independent of any 
desktop environment. 


> If you are just
> sending system diagnostic messages, you should just use the same
> functions as powerd or shutdown use.  I know, these don't do anything
> WRT the GUI or Desktop Environment, but many Desktop Environments have
> the means of intercepting console alert messages and popping them up on
> the screen within the context of the Desktop Environments (eg system
> alert applets or some such).

My intention was to inform the user that a particular program he was 
running (that is, the program I'm developing) had finished running a task.  
It appeared that libnotify did exactly that, but as it appears that all it 
does is send DBUS messages then probably it is better to just learn how to 
use DBUS.


Rui Maciel

[toc] | [prev] | [next] | [standalone]


#1189

FromRobert Heller <heller@deepsoft.com>
Date2011-05-20 08:08 -0500
Message-ID<Q_-dnbEGaMgo-kvQnZ2dnUVZ_vmdnZ2d@posted.localnet>
In reply to#1184
At Fri, 20 May 2011 12:03:20 +0100 Rui Maciel <rui.maciel@gmail.com> wrote:

> 
> Robert Heller wrote:
> 
> > What *exactly* are you trying to acomplish here?  
> 
> As I've written in the post that started this thread, I was looking for a 
> library that handled desktop notifications which was independent of any 
> desktop environment. 

This does not say anything. 

> 
> 
> > If you are just
> > sending system diagnostic messages, you should just use the same
> > functions as powerd or shutdown use.  I know, these don't do anything
> > WRT the GUI or Desktop Environment, but many Desktop Environments have
> > the means of intercepting console alert messages and popping them up on
> > the screen within the context of the Desktop Environments (eg system
> > alert applets or some such).
> 
> My intention was to inform the user that a particular program he was 
> running (that is, the program I'm developing) had finished running a task.  
> It appeared that libnotify did exactly that, but as it appears that all it 
> does is send DBUS messages then probably it is better to just learn how to 
> use DBUS.

OK, this is more specific and clear.  Yes, just sending DBUS messages is
the right thing to do.  I suspect that there are various desktop applets
(or whatever) that can check for traffic in DBUS land and do something
to notify the user in some reasonable way apropriate way.

> 
> 
> Rui Maciel
>                                                                                                               

-- 
Robert Heller             -- 978-544-6933 / heller@deepsoft.com
Deepwoods Software        -- http://www.deepsoft.com/
()  ascii ribbon campaign -- against html e-mail
/\  www.asciiribbon.org   -- against proprietary attachments


                                                                                                                         

[toc] | [prev] | [next] | [standalone]


#1165

FromTim Watts <tw@dionic.net>
Date2011-05-18 20:28 +0100
Message-ID<97jda8-9cb.ln1@squidward.dionic.net>
In reply to#1163
Rui Maciel wrote:

> Tim Watts wrote:
> 
>> libnotify itself is fairly lightwieght:
>> 
>> dpkg -s libnotify1
>> <snip>
>> Depends: libc6 (>= 2.7), libdbus-glib-1-2 (>= 0.78), libglib2.0-0 (>=
>> 2.16.0), libgtk2.0-0 (>= 2.18.0)
>> 
>> So I don't see a serious problem there.
> 
> Being forced to include a hand full of libraries, including libgtk2.0,
> isn't exactly being lightweight, even more when considering that a project
> is forced to depend on those packages just to be able to trigger DE-
> agnostic notification events.
> 
> If you are developing a GTK project then that's acceptable.  If you are
> developing a project based on some other GUI library then those
> requirements become a bit unacceptable.
> 

I think you're being a bit unrealistic. GTK2 is fairly light and almost 
certainly present on any desktop system that is not an embedded type (no one 
mentioned embedded), just because some app almost certainly depends on it 
irrespective of the desktop/window manager.

I needed a modal MOTD window app that appeared during login for all window 
managers and was lightning quick to start and held up th login process until 
the user clicked OK.

I used QT as it was similarly as lightweight, didn't start helper processes 
all over the place and was easy to work with. I considered GTK2 but QT had 
some nice GUI tools to help build it (I hardly do GUI programming).

If you want to get *really* light, it would be best to implement your own, 
with either shared memory and semaphors (update lock) or a simple network 
server that spews copies of the message stream to any clients that choose to 
connect (and this could be over unix domain sockets, not necessarily a full 
IP stack).

I've had a lot of success with simple messages (SLIP framed) over domain 
sockets - and shared memory is also pretty easy to work with.

Both would be pretty simple, the former probably the simplest and client 
language agnostic - and someone could even add a 2libnotify gateway daemon 
if they wanted to stream all the notifications to the same presentation 
applet.

Cheers

Tim

-- 
Tim Watts

[toc] | [prev] | [next] | [standalone]


#1185

FromRui Maciel <rui.maciel@gmail.com>
Date2011-05-20 12:08 +0100
Message-ID<4dd64bcb$0$23415$a729d347@news.telepac.pt>
In reply to#1165
Tim Watts wrote:

> I think you're being a bit unrealistic. GTK2 is fairly light and almost
> certainly present on any desktop system that is not an embedded type (no
> one mentioned embedded), just because some app almost certainly depends
> on it irrespective of the desktop/window manager.

I see what you mean.  Yet, just because a particular library is 
practically standard it doesn't mean it is a good idea to add yet another 
set of dependencies to a project, particularly when those dependencies 
essentially replicate the features made available by a set of 
dependencies.


<snip/>
> If you want to get *really* light, it would be best to implement your
> own, with either shared memory and semaphors (update lock) or a simple
> network server that spews copies of the message stream to any clients
> that choose to connect (and this could be over unix domain sockets, not
> necessarily a full IP stack).

In this case, it suffices to simply not rely on a dependency and post DBUS 
messages.


Thanks for the help,
Rui Maciel

[toc] | [prev] | [standalone]


Back to top | Article view | comp.os.linux.misc


csiph-web