I want to write scripts on Ubuntu that will notify the user through a tool analogous to Growl on OS X (specifically, the growlnotify
command-line tool). What's the equivalent tool on Linux called?
3 Answers
Ubuntu can show notifications, which seem to be equivalent to Growl. It is accessible through DBus (for programs) and through the notify-send
command (for shell scripts).
-
1
-
I think it's possible to send notifications from the command line, but I can't seem to find the exact command.– ManuJan 19, 2011 at 22:07
-
I believe the command is notify-send : ubuntuforums.org/showthread.php?t=642997– ManuJan 19, 2011 at 22:10
-
2Now it's a useful answer ;-) Try editing your answer to incorporate that information. Also the
zenity
andknotify
mentions on the forum are probably worth looking into.– Daniel Beck ♦Jan 19, 2011 at 22:12 -
1I would like to add that
notify-osd
in Ubuntu (which displaysnotify-send
notifications) has a couple of -horrible- bugs (called "features", seriously) including being unable to set the timeout (even though the-t
parameter is documented innotify-send
) on bubbles and not being able to show multiple bubbles at once. For me, this renders notify-osd unusable and while there are patches available, I'm looking for an alternative. This is currently the best fit for me: omgubuntu.co.uk/2012/03/… Jan 17, 2014 at 14:46
There is a Growl port for Linux. Found here: Growl-for-linux
-
1This is only the growl daemon, it doesn't include the growlnotify command. What is a growl client for linux that can send growl messages? Nov 6, 2013 at 12:34
-
The linux equivalent of growlnotify is gntp-send. You can grab the source here and build it yourself. I have a question here that covers the process of using this, but more or less the command reads as
gntp-send -a "App Name" -s host-ip-address -p "password" "title" "test"
where the host ip address is the ip address for the system you want to send the notifications to.– Journeyman Geek ♦Feb 25, 2018 at 6:59
if you are using KDE, it is real easy! just use the kdialog command that is built-in to KDE, as in the example below:
kdialog --passivepopup "Example text"
if you happen to be using plain ubuntu, then you need to install the libnotify-bin package by issuing the following command:
sudo apt-get install libnotify-bin
and then you can send messages with like this:
notify-send "Example text"
the kdialog is a bit more interesting because it does way more than just send notifications from the command-line. you can actually build an interactive gui for your bash programs with it!
anyway, i hope this helps.