How do I post an alert to the gnome shell from the command line?

I’m writing a script to do a check at regular intervals and I want an alert in the Gnome system when it fails. Is there a way to post the alert from a bash shell script or via a command line interface?

You can use this command: notify-send
Example:
notify-send -u critical "Script error"

For the available options
notify-send --help
or
man notify-send

Source: this old article https://fedoramagazine.org/get-gnome-notifications

3 Likes

This topic was automatically closed 28 days after the last reply. New replies are no longer allowed.