I'm teaching myself how to use DBus. The following python program works great to create a test notification on Xubuntu 8.04...but the shell command to do exactly the same thing using exactly the same DBus method doesn't work. What am I doing wrong with the shell command?
(Yeah, I know there are other ways to do this. The point is that I want to master the dbus-send command)
# THIS ONE WORKS
"""This is a python 2.5 script that creates a notification using dbus."""
item = ('org.freedesktop.Notifications')
path = ('/org/freedesktop/Notifications')
interface = ('org.freedesktop.Notifications')
icon = ''
array = ''
hint = ''
time = 10000 # Use seconds x 1000
app_name = ('Test Application')
title = ('NOTIFICATION TEST')
body = ('This is a test of the notification system via DBus.')
bus = dbus.SessionBus()
notif = bus.get_object(item, path)
notify = dbus.Interface(notif, interface)
notify.Notify(app_name, 0, icon, title, body, array, hint, time)
# THIS ONE FAILS
dbus-send --session --dest=org.freedesktop.Notifications \
--type=method_call --reply-timeout=10000 /org/freedesktop/Notifications \
org.freedesktop.Notifications.Notify string:'Test Application' uint32:0 \
string: string:'NOTIFICATION TEST' \
string:'This is a test of the notification system via DBus.' \
array:string: dict:string: int32:10000