I am attempting to use pynotify for a small project, but am having a strange problem on my Fedora 13 machine. It appears that when pynotify is run programmatically it crashes when show()
is called - however if I type that line myself it runs fine! I have tested it also on my Ubuntu box, where it runs absolutely fine.
My testing code is:
import pynotify
pynotify.init('someName')
n = pynotify.Notification("Summary", "Body")
n.show()
And the results of running this:
$ python -i test.py
Traceback (most recent call last):
File "test.py", line 5, in <module>
n.show()
glib.GError: Unable to connect to server
>>> n.show()
True
>>>
So, does anyone have any ideas what may cause this sort of behaviour? Unfortunately the Fedora environment is one that I have little control over, so any solutions requiring root access/etc would not really work. I can try installing pynotify locally, however, if needed. Thanks for any help.