import dbus from time import sleep # define some nice dbus helper, which I really like, cause make code easier to read :) def getDbusObject (bus, busname , objectpath , interface): dbusObject = bus.get_object(busname, objectpath) return dbus.Interface(dbusObject, dbus_interface=interface) #[METHOD] org.freedesktop.Notifications.Notify( s:app_name, u:id, s:icon, s:summary, s:body, as:actions, a{sv}:hints, i:timeout ) -> ( u:return_id ) bus = dbus.SessionBus() notify = getDbusObject(bus, "org.freedesktop.Notifications", "/org/freedesktop/Notifications", "org.freedesktop.Notifications") id = notify.Notify("test", 0, "", "Sending SMS...", "To: Marcin", [], {}, 0) sleep(3) id = notify.Notify("test", id, "", "Message sent!", "To: Marcin", [], {}, 5000) sleep(8) id = notify.Notify("test", id, "", "Message received by recipient!", "Marcin", [], {} , 5000) sleep(2) id = notify.Notify("test", 0, "", "New incoming message!", "From: Marcin", [], {} , 5000) sleep(5)