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
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
Sep 29, 2013 at 22:21 -
-
@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 -
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 fornotify-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.– queegJul 9, 2023 at 19:58