- Create file water.sh
eval "export $(egrep -z DBUS_SESSION_BUS_ADDRESS /proc/$(pgrep -u $LOGNAME gnome-session)/environ)";
DISPLAY=:0 notify-send "Hey, Tran Xuan Nam" "Keep your back straight and drink water!"- Make water.sh executable
sudo chmod +x /path/to/water.sh- Test notification
/path/to/water.sh
4. Create a job which runs every 15 minutes
crontab -e- Add this line to
crontabconfig
*/15 * * * * /path/to/water.sh- Enjoy!
