Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Conditions for the icon for notify-send -i

I tried to send a notification (in Ubuntu 16.04) with an icon.

  -i, --icon=ICON[,ICON...]         Specifies an icon filename or stock icon to display.

Is there any condition for the icon to be shown?

I have an icon on my desktop "image.png"; But when i try this command :

notify-send "message" -i Desktop/USERNAME/image.png

It doesn't show the icon. (It just shows the message)

But, when i try :

 notify-send "Message" -i /usr/share/pixmaps/gksu.png 

It shows the icon and the message.

What's the difference between those two icons? they have the same type (png), also both of them are square (N x N).

like image 339
Shayan Avatar asked Sep 08 '16 07:09

Shayan


1 Answers

Try using the absolute path of the icon, i.e.:

notify-send "message" --icon="~/Desktop/USERNAME/image.png"

or

notify-send "message" --icon="$HOME/Desktop/USERNAME/image.png"
like image 76
redneb Avatar answered Oct 19 '22 18:10

redneb