Notify Send - Desktop Notification Tool

Send desktop notifications with the notify-send command. Learn how to use notify-send for application alerts and messages.

Notify Send

Understanding Notify Send

The notify-send command is a powerful utility for sending desktop notifications on Linux systems that use the D-Bus message bus. It allows applications and scripts to alert users with timely information without interrupting their workflow. This tool is particularly useful for system administrators, developers, and power users who want to automate alerts or receive updates from their scripts.

Basic Usage of Notify Send

To send a simple desktop notification, you can use the following syntax:

notify-send 'Summary of the notification' 'Body of the message goes here.'

Advanced Notification Options

notify-send supports several options to customize notifications, including icons, application names, and urgency levels. Here's an example demonstrating some of these advanced features:

# To send a desktop notification via dbus:
notify-send -i 'icon-file/name' -a 'application_name' 'summary' 'body of message'

# The -i and -a flags can be omitted if unneeded.
  • -i 'icon-file/name': Specifies an icon to display with the notification. This can be a full path to an icon file or a name from the system's icon theme.
  • -a 'application_name': Sets the application name that appears with the notification. This helps users identify the source of the alert.
  • 'summary': The main title or subject of the notification.
  • 'body of message': The detailed content of the notification.

Integrating Notify Send with Scripts

notify-send is commonly used within shell scripts to provide feedback on task completion, errors, or important events. For instance, you could use it to notify yourself when a long-running backup job finishes or when a critical system service restarts.

Further Resources

For more detailed information and advanced usage, you can consult the official documentation: