Tech Tip: Get Notifications from Your Scripts with notify-send
Notify-send is a great application for notifying you when an event has occurred. An event such as a script running to completion.
If notify-send is not installed on your machine already, install the package "libnotify1" (or possibly just "libnotify") from your repositories.
Once installed you can simply type the following, at the command line, to display a pop-up message near your system tray:
By default the message will be displayed for 5 seconds. To change how long a message stays displayed use the "-t" switch. This will change, in milliseconds, how long the message is displayed. Enter "-t 0" to leave the message up until the user closes it.
notify-send "This message will be displayed for 3 seconds" -t 3000 notify-send "Click me to close me." -t 0
You can even add a title and an icon to the notification.
notify-send "This is the Title" \ "Check out the cool icon" \ -i /usr/share/pixmaps/gnome-terminal.png
When used in a script you could set it to notify you periodically by placing the command in a loop:
#!/bin/bash while [ 1 ]; do notify-send "Up Time" "`uptime`" sleep 5m done
- The Tiny Internet Project, Part I
- Machine Learning with Python
- Free Today: September Issue of Linux Journal (Retail value: $5.99)
- Download "Linux Management with Red Hat Satellite: Measuring Business Impact and ROI"
- Bitcoin on Amazon! Sort of...
- Epiq Solutions' Sidekiq M.2
- Android Browser Security--What You Haven't Been Told
- Securing the Programmer
- Nativ Disc
Pick up any e-commerce web or mobile app today, and you’ll be holding a mashup of interconnected applications and services from a variety of different providers. For instance, when you connect to Amazon’s e-commerce app, cookies, tags and pixels that are monitored by solutions like Exact Target, BazaarVoice, Bing, Shopzilla, Liveramp and Google Tag Manager track every action you take. You’re presented with special offers and coupons based on your viewing and buying patterns. If you find something you want for your birthday, a third party manages your wish list, which you can share through multiple social- media outlets or email to a friend. When you select something to buy, you find yourself presented with similar items as kind suggestions. And when you finally check out, you’re offered the ability to pay with promo codes, gifts cards, PayPal or a variety of credit cards.Get the Guide