Search code examples
pythonubuntupynotify

How to set a local image in pynotify?


If I run the following in python in Ubuntu 10.04:

>>> import pynotify
>>> p = pynotify.Notification ("Notice","","/home/george/Pictures/test.png")
>>> p.show()
true

The message displays as expected, except the image does not appear in the OSD. How can I display a local image?

In fact, for what I need, it would be better if I could display a remote image. (via HTTP)

How can I do that?


Solution

  • The following definitely works for me:

    >>> import pynotify
    >>> p = pynotify.Notification("Notice", "", "/usr/share/pixmaps/firefox.png")
    >>> p.show()
    

    alt text http://www.imagebanana.com/img/qfmebkr5/screenshot_009.png

    Are you sure the image is there? With correct permissions?