notification from command line

I read Lars' wish on Debian Planet today. I such situations I normally use the command line tool "beep" (debian package "beep") to produce an audio notification when the job completes.

If you leave the room for a few minutes you could miss the notification, though, so I can see that a visual reminder would be helpful as well.

This resulting python script is here. I recommend installing "beep" and "python2.3-gtk2" to get full functionality.

It would be nice to put an icon or message in the notification area but it appears that there are no python bindings available for doing this at the moment. However, it appears that this will be available once Gnome 2.10 hits unstable, so I'll plan to add an option for this at that point.

In your .bashrc, I recommend making an alias with your favourite options, such as

$ alias notify='notify -p -b --'
    
so that you can simply do
$ notify make foo
    

Update: here's the help:

usage: notify [options] -- command [arg1] [arg2] ...

options:
  -h, --help   show this help message and exit
  -p, --popup  Pop up dialog when command exits
  -b, --beep   Beep PC Speaker when command exits
    

Posted by Jason Hildebrand <jason@opensky.ca> Saturday May 28, 2005 at 1:07 PM

Zenity is a command line tool that seems to do what you want. It can popup dialogs from command-line, insert notification area icons, file browser dialogs, etc.

e.g.

zenity --notification --text "Finished compiling"
OR
zenity --info --text "Finished compiling"

It's a debian package, and the FSF Directory entry for Zenity seems about the best link to it.

Hope this helps!

Posted by: Anonymous on Sunday May 29, 2005 at 3:40 AM

Instead of making a pythin script why not use xmessage to display a simple dialog box? Regards, Deboo

Posted by: Deboo on Wednesday May 30, 2007 at 11:36 PM

Thank u for giving article that easy to understand. Have a look at my club penguin blog: http://www.club-penguin.org

Posted by: Mary on Friday Jul 30, 2010 at 12:56 AM

(This oxygen Jordan nike shoes strong sporting activities a nike shox like colorway. light handles the entire quarter nike shox tl, outsole and as well the bottom part within of the nike sb dunks. darkish is place into use as part of your nike shox tl3, mudguard, heel, internal nike dunks, tongue, shoe laces and cheap jordan shoes within of the cheap nike shox. Varsity red-colored accents show up as part of cheap nike shoes, tongue similarly as other minor places near to the nike shoes . I previously stated which i certainly like the oxygen custom nike air force 1 professional Strong. What are you able to think in nike air force 1 to the newest michael jordan shoes? they are provided now at carry out Line. Make self-confident nike air force 1 discover out much more nike air force 1 just following the jump to obtain a increased look. )

Posted by: http://www.finesale.net on Tuesday Aug 17, 2010 at 10:07 PM

(This oxygen Jordan nike shoes strong sporting activities a nike shox like colorway. light handles the entire quarter nike shox tl, outsole and as well the bottom part within of the nike sb dunks. darkish is place into use as part of your nike shox tl3, mudguard, heel, internal nike dunks, tongue, shoe laces and cheap jordan shoes within of the cheap nike shox. Varsity red-colored accents show up as part of cheap nike shoes, tongue similarly as other minor places near to the nike shoes . I previously stated which i certainly like the oxygen custom nike air force 1 professional Strong. What are you able to think in nike air force 1 to the newest michael jordan shoes? they are provided now at carry out Line. Make self-confident nike air force 1 discover out much more nike air force 1 just following the jump to obtain a increased look. )

Posted by: nike shox on Tuesday Aug 17, 2010 at 10:08 PM
Post a comment
Name:


URL:


Comments: