This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
# This is required for `notify-send` to work from within a cron. | |
# For Ubuntu | |
# http://askubuntu.com/questions/298608/notify-send-doesnt-work-from-crontab/346580#346580 | |
# eval "export $(egrep -z DBUS_SESSION_BUS_ADDRESS /proc/$(pgrep -u $LOGNAME gnome-session)/environ)"; | |
# For Fedora | |
export DISPLAY=:0.0 | |
export $(egrep -z DBUS_SESSION_BUS_ADDRESS /proc/$(pgrep -u $LOGNAME session)/environ) |