In UBUNTU, you will see notifications in the right top corner from the Audio/Video applications and also from the Update Manager, but what if you like to send notification for your computer(Individual computer) or to send notification from your computer to any LAN connected computer?
Before notification, you should install the library file. To do this, go to TERMINAL and type
[stextbox id="info" width="300"]sudo apt-get install libnotify-bin[/stextbox]
Now you can go ahead and start with notifications :)
1. Simple Notification
notify-send can be used to send simple notification as shown below.
[stextbox id="info" width="200"]$ notify-send 'Hi Srikanth' 'Welcome'[/stextbox]
2. Notification with an icon
notify-send can be used to send notification along with an icon using -i option.
[stextbox id="info"]$ notify-send -u critical -i "notification-message-IM" 'Boss !!' 'Am done with the execution'[/stextbox]
notification-message-IM is a type of icon that can be used in the notify-send program.
3. Notification with custom icon
You can use your own custom icon using the notify-send -i option as shown below.
[stextbox id="info"]$ notify-send -i /home/sathiya/deal.ico 'Deal success'[/stextbox]
4. Show output of any command
For example, you can display the last few lines of syslog as shown below.
[stextbox id="info"]$ notify-send syslog "`tail /var/log/syslog`"[/stextbox]
In the same way, you can use any command (for example, date) and display its output as desktop notification using notify-send.
Thanks for reading this article :) Do comment :) :)