xset dmps force off doesn't work in cron
sleep 1
xset dpms force off I add two lines above to the script, and manually run it, it works as I expected. But when the script runs by cron, the "xset dpms force off" doesn't work. anyone had an idea? |
afaik, cron does not use any environment variables.
so, a) you need to use the full path to the executable b) have to tell xset what $DISPLAY is set to c) is cron running as root? might have to sudo to normal user. edit: in retrospect, this seems like an x-y-problem to me. what are you really trying to accomplish here? |
Quote:
Code:
DISPLAY=:0 xset dpms force off |
glad to be of help! :hattip:
|
All times are GMT -5. The time now is 09:22 AM. |