bus = SessionBus()
notifications = bus.get('.Notifications')
##### Global variables
#
our_notify_id = 0
timeout = 3000 # ms
wait4 = 0 # s
body = "from NotifyTest.py"
while wait4 < 6:
wait4 += 1
message = "The next wait will be %ss" % wait4
# This should replace any previous notification still there...
# (can do this with notify-send command, but doing it in python allows
# us to use a fixed id for replacement).
#
our_notify_id = notifications.Notify(app_name, our_notify_id, icon,
message, body, actions_list, hint, timeout)
print("our_notify_id:", our_notify_id)
# At Ubuntu 21.10 we have to change this to get the new message seen...
#
# our_notify_id += 1
print(message)
sleep(wait4)
print("Done")
*=*=* Cut here *=*=*
On 21.04 after the sleep exceeds the 3s timeout a new info message box is displayed.
On 21.10 after the sleep exceeds the 3s timeout nothing is shown.
This python program shows the problem
*=*=* Cut here *=*=*
#!/usr/bin/python3
# -*- coding: utf-8 -*-
#
from pydbus import SessionBus
from time import sleep
##### Global constants p.Notifications " op/Notification s" p.Notifications " icons/breeze/ devices/ 64/camera- web.svg"
#
item = "org.freedeskto
path = "/org/freedeskt
interface = "org.freedeskto
app_name = "NotifyTest"
icon = "/usr/share/
actions_list = []
hint = {}
bus = SessionBus() '.Notifications ')
notifications = bus.get(
##### Global variables
#
our_notify_id = 0
timeout = 3000 # ms
wait4 = 0 # s
body = "from NotifyTest.py"
while wait4 < 6:
wait4 += 1
message = "The next wait will be %ss" % wait4
# This should replace any previous notification still there... Notify( app_name, our_notify_id, icon, "our_notify_ id:", our_notify_id)
# (can do this with notify-send command, but doing it in python allows
# us to use a fixed id for replacement).
#
our_notify_id = notifications.
message, body, actions_list, hint, timeout)
print(
# At Ubuntu 21.10 we have to change this to get the new message seen...
#
# our_notify_id += 1
print(message)
sleep(wait4)
print("Done")
*=*=* Cut here *=*=*
On 21.04 after the sleep exceeds the 3s timeout a new info message box is displayed.
On 21.10 after the sleep exceeds the 3s timeout nothing is shown.