Reply
Thread Tools
Schturman's Avatar
Posts: 5,339 | Thanked: 4,133 times | Joined on Jan 2010 @ Israel
#1
Hi to all
A few day ago I posted it on TJC, but no answer till now... Maybe here someone can help me...
I have a little problem with my python script for custom notification and problem come from .conf file. To be more exactly from one specific line in this .conf file. This problem started from v2.1.1.23.
Here is my python script:
Code:
#!/usr/bin/python
import dbus

bus = dbus.SessionBus()
object = bus.get_object('org.freedesktop.Notifications','/org/freedesktop/Notifications')
interface = dbus.Interface(object,'org.freedesktop.Notifications')
#print(interface.GetCapabilities())

interface.Notify("Battery notifier",
                 0,
                 "icon-m-batterynotifier",
                 "Your battery is 5% !",
                 "Discharging...",
                 dbus.Array(["default", ""]),
                 dbus.Dictionary({"x-nemo-preview-body": "Discharging...",
                                  "x-nemo-preview-summary": "Your battery is 5% !",
                                  "category": "x-nemo.batterynotifier"},
                                  signature='sv'),
                 0)
In the "category" I use my x-nemo.batterynotifier.conf file with this content:
Code:
urgency=2
x-nemo-icon=icon-m-batterynotifier
x-nemo-preview-icon=icon-m-batterynotifier
x-nemo-feedback=battery_notifier
x-nemo-priority=125
x-nemo-user-removable=false
x-nemo-display-on=true
Until v2.1.1.23 all worked perfectly, but now (also on 2.1.2.3) I noticed that I don't get notifications at all. I checked it manually via terminal and got this output:
Code:
[nemo@Jolla-C ~]$ python /usr/share/openrepos-batterynotifier/notifier3.py
Traceback (most recent call last):
  File "/usr/share/openrepos-batterynotifier/notifier3.py", line 19, in <module>
    0)
  File "/usr/lib/python2.7/site-packages/dbus/proxies.py", line 70, in __call__
    return self._proxy_method(*args, **keywords)
  File "/usr/lib/python2.7/site-packages/dbus/proxies.py", line 145, in __call__
    **keywords)
  File "/usr/lib/python2.7/site-packages/dbus/connection.py", line 651, in call_blocking
    message, timeout)
dbus.exceptions.DBusException: org.freedesktop.DBus.Error.AccessDenied: PID 25730 is not in privileged group
[nemo@Jolla-C ~]$
Started to check all my files and found that if I removing line "x-nemo-user-removable=false" from my .conf file, all work perfectly, but it user removable and I don't want it, I want to prevent from user removing this notification from event screen (it's doing another my script automatically).
Some system .conf files like "x-nemo.system-update.conf" also have this line "x-nemo-user-removable=false" and it work (user can't remove system-update notification from event screen)... That mean (I think so) I need do some changes in my script, but I don't know what exactly...
Someone know how to fix it ?
Thanks.
 
Reply

Thread Tools

 
Forum Jump


All times are GMT. The time now is 13:46.