I really read many tutorials, but crontab doesn't start notify send.
What I've tried:
etc/crontabadded at the end:
15 * * * * notify-send 'crontab' 'test'with crontab interface:
crontab -eadded at the end:
15 * * * * notify-send 'crontab' 'test'
I really read many tutorials, but crontab doesn't start notify send.
What I've tried:
etc/crontab
added at the end:
15 * * * * notify-send 'crontab' 'test'
with crontab interface:
crontab -e
added at the end:
15 * * * * notify-send 'crontab' 'test'
As suggested by @Lnux:
Create a .sh, for example test.sh:
#!/bin/sh
eval "export $(egrep -z DBUS_SESSION_BUS_ADDRESS /proc/$(pgrep -u $LOGNAME gnome-session)/environ)";
#Code:
DISPLAY=:0 notify-send "Test"
Then set up crontab:
crontab -e
And at the bottom, add:
* * * * * /home/myUser/test.sh
Obs.: you can place your .sh file in another location and don't forget to allow executing it.
Crontab is running in the background and without specified graphical output it will show nothing. So you should spicify, which output would you like to use. To achieve that, put export DISPLAY=:0 && before you command, e.g.
15 * * * * export DISPLAY=:0 && notify-send 'I am alive!'