I am using Linux Mint 17.I want to be informed every 50 min, at every hour for small break.Here is cron job:nazar@lelyak-desktop ~ $ crontab -lDISPLAY=:0.0XAUTHORITY=/home/matrix/.Xauthority00 13 * * * /home/nazar/Documents/scripts/lunch_break_job.sh # JOB_ID_250 * * * * /home/nazar/Documents/scripts/pc_break.sh # JOB_ID_1* * * * * /home/nazar/Documents/scripts/cron_job_test.sh # JOB_IDHere is script for /home/nazar/Documents/scripts/cron_job_test.sh:#!/bin/bashexport DISPLAY=0.0export XAUTHORITY=/home/matrix/.Xauthorityif [ -r $HOME/.dbus/Xdbus ]; then  . $HOME/.dbus/Xdbusfi/usr/bin/notify-send -i helloThis snippet of function:if [ -r $HOME/.dbus/Xdbus ]; then  . $HOME/.dbus/XdbusfiChecks DBUS_SESSION_BUS_ADDRESS and uses it.According to this answer I executed script, and now my Dbus is saved to $HOME/.dbus/Xdbus:nazar@lelyak-desktop ~ $ cat $HOME/.dbus/XdbusDBUS_SESSION_BUS_ADDRESS=unix:abstract=/tmp/dbus-flm7sXd0I4,guid=df48c9c8d751d2785c5b31875661ebaeexport DBUS_SESSION_BUS_ADDRESSAll should work. I couldn't find what is missed. Because notification doesn't work now.From terminal it works fine:How to solve this issue?SOLUTION:I follow terdon solution. But it doesn't want to work.Now my crontab looks as follows:nazar@lelyak-desktop ~ $ id -u1000nazar@lelyak-desktop ~ $ crontab -lDISPLAY=:0.0XAUTHORITY=/home/nazar/.XauthorityXDG_RUNTIME_DIR=/run/user/100000 13 * * * /home/nazar/Documents/scripts/lunch_break_job.sh # JOB_ID_250 * * * * /home/nazar/Documents/scripts/pc_break.sh # JOB_ID_1# * * * * * /home/nazar/Documents/scripts/cron_job_test.sh # JOB_IDand cron_job_test.sh looks now:#!/bin/bash/usr/bin/notify-send -i /home/nazar/Pictures/icons/Mail.png hello It is just cron test message
Notify-send doesn't work at Cinnamon
cron;cinnamon;notifications;notify send
You need to set XDG_RUNTIME_DIR as well. Change your crontab to this:DISPLAY=:0.0XAUTHORITY=/home/nazar/.XauthorityXDG_RUNTIME_DIR=/run/user/100100 13 * * * /home/nazar/Documents/scripts/lunch_break_job.sh # JOB_ID_250 * * * * /home/nazar/Documents/scripts/pc_break.sh # JOB_ID_1* * * * * /home/nazar/Documents/scripts/cron_job_test.sh # JOB_IDMake sure you change nazar to whatever your username is and 1001 to your actual UID. You can get your UID by running id -u. And all you need in your script is:#!/bin/bash/usr/bin/notify-send hello I just tested this on Arch running Cinnamon and it worked fine.The variables are being set in the crontab, no need to export anything from the script. There's also no point in doing so, the script is being called by cron, it wouldn't export the values you need anyway. 