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?
Asked
Active
Viewed 2.4k times
18
Raystafarian
- 21,583
- 11
- 60
- 89
dan
- 7,227
- 5
- 23
- 23
3 Answers
25
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).
u1686_grawity
- 426,297
- 64
- 894
- 966
Manu
- 2,981
- 9
- 50
- 73
-
1And how does it work, what's the `growlnotify` equivalent? – Daniel Beck Jan 19 '11 at 22:06
-
I think it's possible to send notifications from the command line, but I can't seem to find the exact command. – Manu Jan 19 '11 at 22:07
-
I believe the command is notify-send : http://ubuntuforums.org/showthread.php?t=642997 – Manu Jan 19 '11 at 22:10
-
2Now it's a useful answer ;-) Try editing your answer to incorporate that information. Also the `zenity` and `knotify` mentions on the forum are probably worth looking into. – Daniel Beck Jan 19 '11 at 22:12
-
1I would like to add that `notify-osd` in Ubuntu (which displays `notify-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 in `notify-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: http://www.omgubuntu.co.uk/2012/03/how-to-never-miss-an-ubuntu-notification-again – Jaap Haagmans Jan 17 '14 at 14:46
7
There is a Growl port for Linux. Found here: Growl-for-linux
dbarrett83
- 171
- 1
- 3
-
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? – Will Sheppard Nov 06 '13 at 12:34
-
The linux equivalent of growlnotify is gntp-send. You can grab the [source](https://github.com/mattn/gntp-send) here and build it yourself. I have a question here that covers the [process of using this](https://superuser.com/questions/471590/how-do-i-use-gntp-send), 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 '18 at 06:59
5
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.
Peter Carrero
- 325
- 3
- 10