Hello,
since a week I'm trying to get a crontab turn off and on my monitor.
Simply this gives me:
This works via ssh:
So, I opened crontab with
First i tried:
I get:
I'm trying the script from here:
Saved it as monitorOff.sh and running:Getting:Tried the following script:
Getting the same error. Same with calling the script in crontab.
Does anybody knows a solution?
Thanks!
since a week I'm trying to get a crontab turn off and on my monitor.
Simply this gives me:
Code:
wlr-randr --output HDMI-A-1 --off
Code:
failed to connect to display
Code:
WAYLAND_DISPLAY="wayland-1" wlr-randr --output HDMI-A-1 --off
Code:
crontab -e
Code:
0 23 * * * WAYLAND_DISPLAY="wayland-1" wlr-randr --output HDMI-A-1 --off >>./Log.txt 2>&1
Code:
failed to connect to display
Code:
#!/bin/bashexport WAYLAND_DISPLAY=wayland-1export XDG_RUNTIME_DIR=/run/user/1000/usr/bin/wlr-randr --output HDMI-A-1 --off
Code:
bash monitorOff.sh
Code:
failed to connect to display
Code:
#!/bin/bashexport WAYLAND_DISPLAY=wayland-1export XDG_RUNTIME_DIR=/run/user/1000WAYLAND_DISPLAY="wayland-1" /usr/bin/wlr-randr --output HDMI-A-1 --off
Does anybody knows a solution?
Thanks!
Statistics: Posted by Bezebub — Fri Sep 27, 2024 7:58 pm