
Notify-send -i "/usr/share/icons/ubuntu-mono-light/status/24/battery-caution.svg" "Virtual machine will halt when battery falls below 10% charge." If thenĮcho "$( date +%Y.%m.%d_%T )" > "/home/user/Desktop/VM Halt Low Battery"Įval "export $(egrep -z DBUS_SESSION_BUS_ADDRESS /proc/$(pgrep -u $LOGNAME gnome-session)/environ)" # if virtual machine is running, monitor power consumption The line setting DBUS_SESSION_BUS_ADDRESS in klrmr's response above is the modification that finally got the warnings working correctly.
#READ MANGA ONLINE UNIX FULL#
It does not appear to be necessary to set DISPLAY or articulate full paths for notify-send or anything otherwise normally in $PATH.īelow is a cron script I'm using to shutdown a virtual machine when a laptop's battery state becomes too low. Notify-send "The latest chapter is still $new."Īnd here's what I wrote in my crontab 0,15,30,45 12-23 * * 3 /home/jchester/bin/opreminder.shįor Ubuntu 14.04 at least, klrmr's response above is the correct answer. Notify-send "No new chapter for One Piece." Notify-send "A new chapter of One Piece was released." opreminder.txt | grep "One Piece $new" | wc -l) >=1 )) The file was created, but the notification didn't show. I'm pretty sure that the program is running since I made it to create a file for me.

However, when I placed this in my crontab, the notification doesn't show. The program works when I am trying to run it in terminal. I used the command notify-send to do this. I made a script that should notify me when there's a new chapter of manga that I'm reading.
