Show image notification from bash script
What I'm trying to accomplish: On Ubuntu 10.04 I'd like to display a small notification image in the corner of the screen and have the image fade out. I'd like to do it from the command line for use with bash scripts. Similar to "notify-send", "zenity", or "dialog" except it displays images as well.
What I've found so far: ImageMagick animate seems to be the only command line tool that can di开发者_StackOverflow中文版splay an image and exit without user interaction.
Is there anything any better? I could write one myself but I thought there should already be something to do this.
gcin
does the work. It shows full size images as notifications.
sudo apt-get install gcin gcin-message -icon your_image.jpg
Extract of man gcin-message
:
NAME gcin-message - gcin's notification tool SYNOPSIS gcin-message [-icon file] [-text string] [-duration milliseconds] DESCRIPTION gcin-message displays notification image and/or text. It is useful for filters to have interaction with users. OPTIONS -icon file Display an image. -text string Display text string. The space character is not allowed. -duration milliseconds Time to show notifications.
However I suggest you to not use this tool, because its installation from the Ubuntu repository is not fine grained (6 MB of stuff and a chinese icon in the notification area).
See if you can get gcin-message
out of the gcin
package and put it into your own package (if this suits your needs).
精彩评论