crontab 中netsend需要设置显示输出
00 * * * * export DISPLAY=:1.0;notify-send -u normal -t 50000 -i appointment-new '1分钟后锁屏' '注意休息,善待眼睛、善待颈椎'
DISPLAY用来设置将图形显示到何处.
export DISPLAY=:1.0
export DISPLAY=:0.0
用
xdpyinfo测试DISPLAY设置是否有错误
crontab 中netsend需要设置显示输出
00 * * * * export DISPLAY=:1.0;notify-send -u normal -t 50000 -i appointment-new '1分钟后锁屏' '注意休息,善待眼睛、善待颈椎'
DISPLAY用来设置将图形显示到何处.
export DISPLAY=:1.0
export DISPLAY=:0.0
用
xdpyinfo测试DISPLAY设置是否有错误