In Ubuntu 13.04 yad and Zenity notification icons aren't showed in Unity.
I have written a script to use notification icon to alert me about lftp download progress.
Is there any alternative that it works in Unity?
-
Have you checked out notify-send?– wojoxAug 10, 2013 at 20:17
-
I need a icon with menu or that I can pick in it to open the terminal with lftp. By other side, the notifications only are useful when I'm in front of PC.– Juan SimónAug 12, 2013 at 23:10
-
I think alltray should be able to be used to put the yad/zenity window on the systray, but... after I tried it here, the window simply vanished and no systray icon for it showed, I think there have some incompatibility here, but may work for you? Also, may be, that feature could be asked for yad or even zenity.– Aquarius PowerNov 29, 2015 at 6:36
2 Answers
Include notify-send "notification text"
as one of the lines in your bash script and a notification should pop up for a few seconds in the upper left corner of your screen.
Here's an example, a script I use in a chron job to back up my user data to a server at home where I use notify-send:
#! /bin/bash
#
# First, we send a notification to the user that we've started.
notify-send "rsync backup started"
#
# cd to home.
cd ~/
#
# rsync my local home to rsync-marc on vulcan.
rsync --exclude-from rsync-excluded-files.txt -azvv -e ssh ~/ [email protected]:/media/marc/1d0b8719-f064-40a8-9589-4e65583788a8/marc/marc-rsync
#
# Last, we send a notification to the user that we've started.
notify-send "rsync backup completed"
For more information on the many different parameters you could use, like always, man notify-send
.
-
Thanks, but this solution isn't valid for me. I need a icon with menu or that I can pick in it to open the terminal with lftp. Aug 11, 2013 at 17:48
You can install an unity indicator that permit you to see icon-tray.
This one is pretty cool: http://www.webupd8.org/2015/05/on-demand-system-tray-for-ubuntu.html
Add this ppa:
$ sudo apt-add-repository ppa:fixnix/indicator-systemtray-unity
$ sudo apt-get update
$ sudo apt-get install indicator-systemtray-unity
I reply 2 years after because it can help someone who fall here.
-
1Whilst this may theoretically answer the question, it would be preferable to include the essential parts of the answer here, and provide the link for reference ;)– hg8Sep 17, 2015 at 9:51
-
for some reason, it crashed my cairo-dock, and couldnt restart it; only after removing that app, cairo-dock got back to work :(, but.. I already have tray icons, and I can have custom ones with ksystraycmd (but I cant find a way to click on it and open a menu or anything else, seems just a very simple icon indicator) and all-tray (still learning about it too). Nov 29, 2015 at 6:10
-
Bumping this answer because the rcspam took time to update it and also to counter the downvotes.– ccpizzaSep 24, 2016 at 7:41