notify-send

First of all I would like to give a big shout out to the folks who wrote libnotify. Libnotify standarized gnome notification solution, and they did a good job of it. The popup widget allows you to add buttons, images, and they look very good.

notify-send is a command line utility that makes uses libnotify to send notifications the the user.

for example:

notify-send hi

shows this:

notify-send.png

As soon as i discouvered this I started using it to notify me when my build is finished. So:

 

make && notify-send DONE!

Then I got fancier and I added this to my .bashrc:

alias saydone='notify-send "Done! `if [ \$? = 0 ]; then echo \:\); else echo \:\(; fi`"'

no explanation nessesary of course.

so now I do;

../frysk/autogen.sh ; saydone

If the autogen returns a 0 i get a smily face, otherwise I get a frowny.

saydone.png

Now for the bash guros out there. How do i make it print the previously run command so that the notification says “../frysk/autogen.sh finished :)”

About these ads

49 Responses to “notify-send”

  1. uzytkownik Says:

    % cat untested.sh
    #!/bin/sh
    ($@) && notify-send “Done” “$@”

  2. sami Says:

    That works :)

  3. Michal Says:

    sami, your idea with the smiles made my socks drop! that was SO FUN ! thanks for the post

  4. sami Says:

    Thanks Michal… although i shouldnt take credit… i stole it from a friend of mine who had it on his bash prompt :).

  5. Sami Wagiaalla » Blog Archive » saydone Says:

    [...] while back I blogged about how I use notify-send from libnotify to tell me when my builds are [...]

  6. thebohemian Says:

    Here is a bash function which you can put into .bashrc and prepend to all commands which you would like to be notified.

    Erroneous state is highlighted in multiple ways:
    – ‘critical’ message urgency (paints in red here)
    – unhappy smiley
    – failed written in italics

    sd ()
    {
    ($@)

    if [ $? = 0 ]
    then
    notify-send “:-) done: $@”
    else
    notify-send –urgency=critical “:’( failed: $@”
    fi
    }

    Happy hacking!

  7. thebohemian Says:

    Markup was eaten by blog….

    Surround failed with and .

  8. sami Says:

    wordress ate up the markup again :)

    whats is strange is the italics mark up does not work for me from command line either

    Nice patch… but i kind of like the smily after the done/failed.

  9. U-P-S Says:

    alias saydone=’notify-send “Done! `if [ \$? = 0 ]; then echo \:\); else echo \:\(; fi`”‘

    alias quiet-upgrade= apt-get update > update.txt && apt-get upgrade -y > upgrade.txt ; saydone

    then only

    sudo quiet-upgrade

    (or maybe not?) ;)
    all you have are logs and notify.

  10. U-P-S Says:

    i am quite wrong so i had to rewrite whole script. looks like .sh file + bash asdf.sh + aliases = boom so my script looks like this:

    apt-get update > apt-update-\`date\`-.txt && apt-get upgrade > apt-upgrade-\`date\`.txt ; notify-send “Done! `if [ \$? = 0 ]; then echo \:\); else echo \:\(; fi`”

    run with

    sudo bash quiet-upgrade.sh

    NOTE: it will not print any date in name of file, but however, without \s in front of ` script epic fails, you can try

  11. sami Says:

    Neat :)

  12. Andrew Conkling Says:

    Thanks for your post; clever idea! For what it’s worth, on Debian/Ubuntu notify-send is part of the libnotify-bin package. :)

  13. Joe Says:

    took your saydone script and modified to show alerts in the tray (using zenity, instead of notify-send):

    #!/bin/sh
    ($@) ; zenity –notification –text “Done! `if [ \$? = 0 ]; then echo \:\); else echo \:\(; fi` $1″

  14. Solnce Says:

    such a real story..

  15. Execute-Notify Says:

    [...] a useful command-line interface to libnotify that lets alerts pop up on the desktop. As is the case for many others, I like the idea of using this tool to notify me that my long-running jobs are finished, so I can [...]

  16. Jacob Lunde Says:

    I also was using this to pass along info to users of updates or uploads to there work stations, I find if you use -t 0 in the mix it requires them to press the x to kill the message. I thought -u critical would do this, but it didnt seem to work, might be that cairo-dock is taking some time to theme it. Hope this helps any one else out there.

  17. notify-send – apeekaboo:s wonderful world Says:

    [...] Another interesting example of notify-send can be found here. [...]

  18. Command: notify-send | apeekaboo:s wonderful world of Linux Says:

    [...] Another interesting example of notify-send can be found here. [...]

  19. notify-send notification look (design) Says:

    [...] a regular user, the notification is displayed in right lower corner and is white (looks like this http://wagiaalla.com/2007/06/06/notify-send/). When running as root, the notification is displayed in upper right corner and is black (looks [...]

  20. seo Says:

    Would you be able to information me on your webmaster or the guy who deals with your site, I’d like to know if it would be very easy to be a visitor poster

  21. google plus account login Says:

    I do not even know how I ended up here, but I thought this post was great.
    I don’t know who you are but definitely you’re going to a famous blogger if you are not already ;) Cheers!

  22. www Says:

    I must thank you for the efforts you’ve put in writing this site.
    I really hope to check out the same high-grade blog posts by you in the future as well.

    In truth, your creative writing abilities has motivated me to get my own site now ;)

  23. redunovin Says:

    Good blog post. I definitely appreciate this website.

    Continue the good work!

  24. pure garcinia plus with zen cleanse Says:

    Hey would you mind letting me know which webhost you’re utilizing?
    I’ve loaded your blog in 3 different web browsers and I must say this blog loads a lot quicker then most.
    Can you recommend a good web hosting provider at a reasonable price?
    Many thanks, I appreciate it!

  25. natural green cleanse walgreens Says:

    Someone essentially assist to make seriously articles I might
    state. That is the very first time I frequented your website page
    and so far? I surprised with the analysis you made to make this particular
    submit amazing. Excellent process!

  26. Ivan Says:

    Your style is really unique compared to other folks I’ve read stuff from.
    I appreciate you for posting when you’ve got the opportunity, Guess I will just book mark this web site.

  27. Ronda Says:

    I have been browsing online more than three hours today, yet
    I never found any interesting article like yours.
    It is pretty worth enough for me. Personally, if all site owners and bloggers made good
    content as you did, the net will be a lot more useful than ever before.

  28. how to link google plus and facebook Says:

    I like what you guys tend to be up too. This kind of clever
    work and exposure! Keep up the superb works guys I’ve you guys
    to my personal blogroll.

  29. ilmainen kolikkopeli Says:

    It’s an amazing paragraph for all the web viewers; they will get advantage from it I am sure.

  30. Bob Duggan Businessman Says:

    If some one wishes expert view concerning running a blog after that i suggest him/her
    to pay a quick visit this blog, Keep up the fastidious work.

  31. air conditioning repairs Nashville TN Says:

    Since the admin of this web page is working, no doubt very
    soon it will be famous, due to its feature contents.

  32. physical therapy in los Angeles Says:

    Heya! I know this is sort of off-topic however I had to ask.
    Does operating a well-established blog such as yours take a large amount of
    work? I’m completely new to blogging but I do write in my journal everyday.
    I’d like to start a blog so I can easily share my experience and thoughts online.
    Please let me know if you have any kind of ideas or tips for new aspiring blog owners.
    Thankyou!

  33. is venus factor legit Says:

    Just wish to say your article is as surprising. The clearness in your post is just spectacular and i can assume you’re an expert on this subject.

    Fine with your permission let me to grab your feed to keep updated with forthcoming post.
    Thanks a million and please keep up the enjoyable work.

  34. make money online Says:

    An interesting discussion is worth comment. I do think
    that you should publish more about this issue, it may not be a taboo matter but generally folks don’t
    speak about such topics. To the next! All the best!!

  35. repaving asphalt driveway allentown pa Says:

    Ahaa, its nice conversation regarding this piece of writing here at this weblog, I have read all that, so at
    this time me also commenting here.

  36. how to make quick cash Says:

    Wow, this post is fastidious, my sister is analyzing these kinds of things, therefore I am going to tell her.

  37. bathing suit Says:

    For most recent news you have to go to see world wide web and on internet
    I found this web page as a finest website
    for hottest updates.

  38. dentists Wake Forest NC Says:

    A person essentially help to make significantly posts I would state.

    This is the very first time I frequented your web page and thus
    far? I amazed with the analysis you made to make this actual post amazing.
    Great activity!

  39. garage door panel repair Minneapolis MN Says:

    This is a great tip particularly to those fresh to
    the blogosphere. Short but very accurate info… Thank you for sharing this one.
    A must read post!

  40. Wikicheats.Gametrailers.Com Says:

    Hi to all, since I am in fact keen of reading this webpage’s post to be updated
    regularly. It includes fastidious material.

  41. furnace repair cost Dothan AL Says:

    Very nice blog post. I definitely appreciate this site. Thanks!

  42. Donald Says:

    Truly when someone doesn’t be aware of afterward its up to other users that
    they will assist, so here it occurs.

  43. Atlanta Roofing Says:

    Good information. Lucky me I ran across your website by chance (stumbleupon).
    I’ve saved it for later!

  44. wholesale waterproof mobile phone Says:

    I’ve been surfing online more than 3 hours today, yet I never found any interesting
    article like yours. It’s pretty worth enough for me.

    Personally, if all website owners and bloggers made good content as you
    did, the web will be much more useful than ever before.|
    I could not resist commenting. Well written!|
    I’ll immediately snatch your rss as I can not to find your e-mail subscription link
    or e-newsletter service. Do you’ve any? Kindly let me know so that I may subscribe.
    Thanks.|
    It’s appropriate time to make some plans for the future and it is time to be happy.
    I have read this post and if I could I desire to suggest you few interesting
    things or tips. Maybe you can write next articles referring to this article.
    I want to read more things about it!|
    It’s perfect time to make some plans for the longer
    term and it is time to be happy. I’ve read this post and if I may just I want to counsel you few interesting things or tips.
    Maybe you can write next articles relating to this article.

    I wish to read more things about it!|
    I’ve been browsing online greater than three hours nowadays,
    but I by no means found any attention-grabbing article like yours.
    It’s beautiful value sufficient for me. Personally, if all webmasters and bloggers made just
    right content as you did, the internet will likely be a lot more helpful than ever before.|
    Ahaa, its pleasant conversation about this paragraph at this place
    at this blog, I have read all that, so now me also commenting here.|
    I am sure this paragraph has touched all the internet users, its really really pleasant piece of writing on building up new blog.|
    Wow, this piece of writing is pleasant, my younger sister is
    analyzing such things, thus I am going to convey her.|
    bookmarked!!, I like your site!|
    Way cool! Some very valid points! I appreciate you penning this post plus the
    rest of the site is really good.|
    Hi, I do think this is a great website. I stumbledupon it ;) I am going to come back once again since I saved as a favorite it.
    Money and freedom is the greatest way to change, may you be rich and continue to guide
    other people.|
    Woah! I’m really loving the template/theme of this blog.
    It’s simple, yet effective. A lot of times it’s very hard to get
    that “perfect balance” between usability and appearance.
    I must say you have done a awesome job with this.
    Also, the blog loads very fast for me on Internet explorer.

    Exceptional Blog!|
    These are actually enormous ideas in on the topic of blogging.

    You have touched some good things here. Any
    way keep up wrinting.|
    I really like what you guys are usually up too. This sort of clever work and reporting!

    Keep up the fantastic works guys I’ve you guys to my own blogroll.|
    Howdy! Someone in my Facebook group shared this website with
    us so I came to give it a look. I’m definitely enjoying the information. I’m bookmarking and will be tweeting this to my followers!
    Fantastic blog and excellent design and style.|
    I enjoy what you guys tend to be up too. Such clever work and reporting!
    Keep up the very good works guys I’ve included you guys to my own blogroll.|
    Hey there would you mind sharing which blog platform you’re working with?
    I’m looking to start my own blog in the near future but I’m having a
    tough time deciding between BlogEngine/Wordpress/B2evolution and Drupal.
    The reason I ask is because your layout seems different then most blogs and I’m looking for something completely unique.
    P.S Sorry for getting off-topic but I had to ask!|
    Hey there would you mind letting me know which web host
    you’re utilizing? I’ve loaded your blog in 3 different internet browsers and I must say this
    blog loads a lot quicker then most. Can you suggest a good web hosting provider at
    a fair price? Cheers, I appreciate it!|
    I like it when folks come together and share views. Great website, continue the good work!|
    Thank you for the auspicious writeup. It in fact was a
    amusement account it. Look advanced to more added agreeable from
    you! By the way, how can we communicate?|
    Hey just wanted to give you a quick heads up. The text in your
    article seem to be running off the screen in Internet explorer.
    I’m not sure if this is a format issue or something to do with internet browser compatibility but
    I thought I’d post to let you know. The design and style look great though!
    Hope you get the issue resolved soon. Kudos|
    This is a topic that is near to my heart…
    Many thanks! Where are your contact details though?|
    It’s very straightforward to find out any matter on web as compared to textbooks, as I found this post at
    this web site.|
    Does your website have a contact page? I’m having
    trouble locating it but, I’d like to send you an email.

    I’ve got some recommendations for your blog you might be interested in hearing.
    Either way, great blog and I look forward to seeing it develop over time.|
    Hello! I’ve been reading your web site for a while now and finally got the bravery to
    go ahead and give you a shout out from Huffman Texas!
    Just wanted to mention keep up the fantastic job!|
    Greetings from Idaho! I’m bored at work so I decided to
    browse your blog on my iphone during lunch break.

    I love the knowledge you present here and can’t wait to take a look when I
    get home. I’m surprised at how fast your blog loaded on my cell
    phone .. I’m not even using WIFI, just 3G .. Anyways, very good blog!|
    Its such as you read my mind! You appear to grasp so much about this, such as you wrote the e-book in it or something.

    I think that you just can do with some p.c. to drive the message house a little bit, however other than that, that
    is fantastic blog. An excellent read. I’ll definitely be back.|
    I visited various web sites however the audio quality for
    audio songs present at this website is genuinely wonderful.|
    Howdy, i read your blog from time to time and i own a similar one and i was just wondering
    if you get a lot of spam comments? If so how do you stop it, any
    plugin or anything you can suggest? I get so much lately it’s driving me
    mad so any help is very much appreciated.|
    Greetings! Very helpful advice in this particular post! It
    is the little changes that make the biggest changes. Thanks for sharing!|
    I seriously love your blog.. Very nice colors & theme. Did you make
    this web site yourself? Please reply back as I’m
    trying to create my own personal site and would like to learn where
    you got this from or what the theme is called. Appreciate it!|
    Howdy! This blog post could not be written any better! Reading through this article
    reminds me of my previous roommate! He constantly kept talking about this.
    I most certainly will send this information to him. Pretty sure he’s going
    to have a very good read. I appreciate you for sharing!|
    Whoa! This blog looks exactly like my old one! It’s on a
    entirely different topic but it has pretty much the
    same page layout and design. Excellent choice of colors!|
    There is definately a lot to know about this issue.

    I love all the points you’ve made.|
    You made some really good points there. I looked on the net for more information about
    the issue and found most people will go along with your views on this website.|
    What’s up, I log on to your new stuff regularly.

    Your story-telling style is awesome, keep it up!|
    I just could not go away your web site before suggesting that I actually loved
    the usual information an individual supply in your
    visitors? Is going to be again steadily in order to investigate cross-check new
    posts|
    I needed to thank you for this excellent read!!
    I definitely loved every little bit of it. I have you book marked to check out new things you post…|
    Hello, just wanted to mention, I enjoyed this blog post. It was inspiring.
    Keep on posting!|
    I comment each time I like a post on a site or if I have something to valuable to contribute to the discussion. It’s triggered by the fire communicated in the post I browsed.
    And on this post notify-send | Sami Wagiaalla’s Blog.
    I was actually excited enough to post a comment ;-) I do have a couple of questions for you if it’s okay.
    Is it only me or do a few of these comments appear as if they are written by brain dead individuals? :-P And, if you are writing at other social sites, I would like to keep
    up with anything new you have to post. Would you make a list all of all your shared sites like your Facebook page, twitter feed, or linkedin profile?|
    Hi there, I enjoy reading all of your article post. I like
    to write a little comment to support you.|
    I always spent my half an hour to read this webpage’s content everyday
    along with a mug of coffee.|
    I for all time emailed this blog post page to all my
    friends, for the reason that if like to read it then my links will too.|
    My coder is trying to persuade me to move to .net from PHP.
    I have always disliked the idea because of the expenses.
    But he’s tryiong none the less. I’ve been using Movable-type on various websites for about a year
    and am concerned about switching to another platform. I have heard fantastic things about blogengine.net.
    Is there a way I can import all my wordpress content into
    it? Any kind of help would be greatly appreciated!|
    Hi there! I could have sworn I’ve visited this blog before but
    after going through some of the articles I realized
    it’s new to me. Anyways, I’m certainly pleased I
    found it and I’ll be bookmarking it and checking back regularly!|
    Terrific work! This is the kind of information that are supposed to be shared across the internet.
    Shame on Google for no longer positioning this put up higher!
    Come on over and seek advice from my web site . Thank you =)|
    Heya i’m for the first time here. I came across this board and I find It truly useful & it helped
    me out a lot. I hope to give something back and help others like you aided
    me.|
    Hi there, I do believe your blog might be having web browser compatibility problems.
    When I take a look at your website in Safari, it looks fine however,
    if opening in IE, it’s got some overlapping issues.
    I just wanted to give you a quick heads up! Besides that, great blog!|
    Somebody necessarily assist to make seriously posts I might state.
    That is the first time I frequented your website page and thus far?
    I amazed with the research you made to create this particular put up extraordinary.
    Magnificent activity!|
    Heya i am for the first time here. I found this board and I in finding It
    truly helpful & it helped me out a lot. I am hoping to provide something again and help others such as you helped me.|
    Hello! I simply wish to give you a huge thumbs up for your great info you’ve got here on this
    post. I am coming back to your website for more soon.|
    I always used to study paragraph in news papers but now as I
    am a user of net therefore from now I am using net for
    articles or reviews, thanks to web.|
    Your mode of describing all in this post is really good, all be capable of without difficulty know it, Thanks a lot.|
    Hi there, I discovered your web site by means
    of Google while looking for a comparable subject, your website came up, it appears to be like great.
    I’ve bookmarked it in my google bookmarks.
    Hi there, simply become alert to your weblog through Google,
    and found that it is truly informative. I am going to watch out for brussels.
    I’ll be grateful if you happen to proceed this in future.
    Lots of people will likely be benefited out of your writing.
    Cheers!|
    I am curious to find out what blog system you have been working with?
    I’m experiencing some minor security problems with my latest site and I’d like to find
    something more secure. Do you have any recommendations?|
    I am really impressed with your writing skills as well as with the layout on your blog.
    Is this a paid theme or did you customize it yourself? Either way keep up the nice quality writing,
    it’s rare to see a nice blog like this one nowadays.|
    I’m really impressed along with your writing talents
    and also with the format in your weblog. Is that this a paid subject matter or did you modify it your self?
    Anyway stay up the nice quality writing, it’s
    uncommon to see a great weblog like this one nowadays..|
    Hi, Neat post. There is a problem along with your site in web explorer, could check this?
    IE nonetheless is the market chief and a large component of other folks will pass over your great writing due to this
    problem.|
    I’m not sure where you are getting your info, but good
    topic. I needs to spend some time learning much more or understanding more.

    Thanks for wonderful information I was looking for this info for my mission.|
    Hello, i think that i saw you visited my website thus i came to
    “return the favor”.I am attempting to find things to enhance
    my web site!I suppose its ok to use {some of|a \

  45. Corine Says:

    I am curious to find out what blog platform you’re working with?
    I’m having some small security issues with my latest website and I would
    like to find something more safeguarded. Do you have any recommendations?

  46. Lawyer Database Peoria Il Says:

    Hi there to every single one, it’s truly a fastidious for me to pay a visit this website, it consists of precious Information.

  47. pregnancy sites Says:

    Excellent way of telling, and pleasant post to take data concerning my presentation topic,
    which i am going to deliver in institution of higher education.

  48. zunimountaintrading.com Says:

    I don’t even know how I ended up here, but I
    thought this post was good. I do not know who you are but definitely you
    are going to a famous blogger if you aren’t already ;) Cheers!

  49. Attorneys Ethics In Peoria Il Says:

    Hey there, You’ve done a great job. I’ll definitely digg it and
    personally recommend to my friends. I am confident they’ll be benefited from this web site.

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s


Follow

Get every new post delivered to your Inbox.

%d bloggers like this: