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?
Asked
Active
Viewed 1.4k times
1 Answers
23
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.
-
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 '13 at 22:21
-
@Lmuller18: Not quite - see my updated answer please. – guntbert Sep 30 '13 at 17:28
-
@guntbert The `.../256x256/...` sub-directory had better icons for me than the `.../32x32/...` sub-directory. Thanks for sharing location. – WinEunuuchs2Unix Nov 11 '16 at 21:38
-
1I'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 https://askubuntu.com/questions/147334/show-all-pictures-recursively-include-any-subfolders – Michael Altfield May 11 '23 at 17:47
-
Absolute pathnames - how intuitive. That should be worth an update in the manpage. – Hiran Chaudhuri Jul 09 '23 at 19:58