19

In notify-send I know that -i can be used to add a stock image to the notification, but how can I add my own custom image? I have gone into usr/share/icons/gnome/32x32 where notify-send pulls from, but it won't show any image at all. Is it possible to include an image other than the stock images?

1 Answer 1

24

You need to tell it where to find the icon, like

notify-send -i /usr/share/icons/gnome/32x32/status/stock_lock-broken.png  summary test

And of course you can use your own icon too, not only the default ones.

For using an icon from your own home directory you would use one of

notify-send -i ~/pictures/picture-name.png summary test
notify-send -i /home/<yourusername>/pictures/picture-name.png summary test

Remember: names are case sensitive and paths must be absolute paths. /Home probably doesn't exist on your system.

man notify-send will tell you about other options too.

5
  • Thank you for this. I must have been messing up the path somewhere. I know that it's best to store these icons on the file system, but if I had my icons stored in home/pictures, would the code be notify-send -i /Home/Pictures/picture-name.png summary test
    – Lmuller18
    Sep 29, 2013 at 22:21
  • @Lmuller18: Not quite - see my updated answer please.
    – guntbert
    Sep 30, 2013 at 17:28
  • @guntbert The .../256x256/... sub-directory had better icons for me than the .../32x32/... sub-directory. Thanks for sharing location. Nov 11, 2016 at 21:38
  • 1
    I'll just add that there's a ton of icons in /usr/share in many scattered directories. To find which icon I want to use for my project, I installed shotwell (apt-get install shotwell), which is an image viewer that allows you to scan directories recursively. Anyone looking to find icons for notify-send may also want to checkout the following software askubuntu.com/questions/147334/… May 11, 2023 at 17:47
  • Absolute pathnames - how intuitive. That should be worth an update in the manpage.
    – queeg
    Jul 9, 2023 at 19:58

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .