DISCUSSION

RPi - Run a command when screensaver is active.

1 people are following

Hi All, 

I'd like to run a command the screen saver is active on my Rpi to turn off the DSI LCD: 

 echo 1 > /sys/class/backlight/rpi_backlight/bl_power

I've tested and after chmod 777 /sys/class/backlight/rpi_backlight/bl_power (don't tell the admin!) I can run this command manually with echo 0 to turn on the display and echo 1 to turn off the display.
Is there some sort of a flag I can look for when the screensaver is active? I can then have a cron task look for this flag and run the appropriate command.

Better yet can I have the screensaver run an entry and exit command?

Thanks

Mike

Replies -19 - 0 (0)

Login to comment

Login
Like most websites, we also use cookies. But don't worry, we only use them for your login and statistics.