以下是crontab -e
的设置,但它不起作用。
*/20 * * * * export DISPLAY=:0.0;/usr/bin/notify-send "Take A Rest Please!" "Pay attention to your Eyes and Neck!"
以下是一些可用于解决crontab问题的基本步骤:
* * * * * export DISPLAY=:0.0 && /usr/bin/notify-send "Take A Rest Please!" "Pay Attention to your Eyes and Neck!"
那个适用于我的ubuntu 18。
您可以使用以下命令执行此操作:
/var/log/syslog
要么
grep CRON /var/log/syslog
尝试你的系统设置,在通知部分:启用'通知弹出窗口'我有同样的问题,并以这种方式解决它
***更新:检查你是否安装了notify-osd软件包(sudo apt install notify-osd)