Notification through libnotify seems to work under icewm, as the different notifications from applications like konversation show. But I can't get it to work from the command line using the notify-send command. When I try it, the notification doesn't appear on my screen at all.

How can I get it to work under icewm?

Edit 1: I've now tried dbus-monitor. It seems there's a problem with notify-send: it isn't specifying any destination, whereas konversation for example specifies knotify as destination. Maybe this is what's causing the problem?

Edit 2: I've also tried d-feet to reproduce the query :(see http://dropcanvas.com/521xc/97), still nothing.

The query I tried to reproduce was this one:

method call sender=:1.14 -> dest=org.kde.knotify serial=1024 path=/Notify; interface=org.kde.KNotify; member=event  
   string "queryMessage"  
   string "konversation"  
   array [  
   string ""  
   string "<html>&lt;ychaouche|ghost&gt; hello</html>"  
   array [  
   array [  
   int32 -1  
   int64 33554870  
method return sender=:1.8 -> dest=:1.14 reply_serial=1024  
   int32 1072  

It was captured using dbus-monitor, sent from konversation when receiving a PM from myself to myself (using xchat, konversation and two nicks).

  • What was your command line? And what does “not work” mean? Did you get an error message, a kernel panic, did the notification not appear? What about the return value of notify-send? – Marco Nov 5 '12 at 14:57
  • A got the BSOD... more seriously, not work means nothing happened. – ychaouche Nov 5 '12 at 16:13
  • the command line was notify-send "halp" "hahaha" – ychaouche Nov 5 '12 at 16:16
  • 1
    This works for me. Can you start dbus-monitor and run the command again? Check if you can see the notification request. – Marco Nov 5 '12 at 16:26
  • Oh thanks for the dbus-monitor tip, appearantly there's a problem with notify-send : it's putting no destination somewhere, whereas konversation for example puts knotify as destination. Maybe the problem comes from here ? pastie.org/5190564 – ychaouche Nov 5 '12 at 16:48

This should work from the command line.

notify-send -u normal -t 60 -a cli "test notification" "This is simply a notification"

I built this string reading directly from the notify-send --help information.

Of course, the man page gives more detailed information.

| improve this answer | |
  • It Didn't. (stupid character limitation text). – ychaouche Nov 5 '12 at 16:15
  • 4
    @ychaouche The "stupid character limitation text" is because it's helpful if you include details like what went wrong – Michael Mrozek Nov 6 '12 at 0:08
  • So what exactly did it do? – vgoff Nov 6 '12 at 0:12
  • Nothing. Buffalo buffalo Buffalo buffalo buffalo buffalo Buffalo buffalo – ychaouche Nov 6 '12 at 9:06
  • It can't really do nothing, it either terminated successfully or it terminated with an error, or it is still running. – vgoff Nov 6 '12 at 16:13

You can maybe try the solution via dbus-send proposed there :

dbus-send --session --type=method_call --reply-timeout=10000 \
  --dest=org.freedesktop.Notifications \
  /org/freedesktop/Notifications  org.freedesktop.Notifications.Notify \
  string:"app_name" \
  uint32:0 \
  string:'app_icon' \
  string:"summary" \
  string:"body" \
  array:string:"" \

notify-send is actually a wrapper around this command.

| improve this answer | |
  • Thanks, but that didn't work. However, using dbus-monitor, I could capture this message : pastie.org/5190800. Do you know how to translate this into that ? – ychaouche Nov 5 '12 at 17:22
  • This works for me as well as the notify-send command you proposed. I believe your problem is not in the request. – Vincent Nivoliers Nov 5 '12 at 18:04
  • 1
    from this page they propose to set the environment variable DBUS_SESSION_BUS_ADDRESS before running notify-send. Maybe you could try their solution. – Vincent Nivoliers Nov 5 '12 at 18:30
  • Thanks vincent, but still nothing pastie.org/5194703 :( – ychaouche Nov 6 '12 at 11:06

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.