kenneho
Posts: 17
Joined: Thu Jul 28, 2016 2:33 pm

Re-enable screen blanking in script

Thu Aug 11, 2016 5:53 pm

Hi all.

I'm working on creating a very simple children's alarm clock, where my Pi3B will show images for a while when my kids is going to sleep. At the start of the script I'm disabling screen blanking. When the script completes, I'd like to enable screen blanking again (without rebooting), to turn off the screen so to speak. In short, I need to reverse the first three lines of the script:

Code: Select all

DISPLAY=:0.0 xset s off
DISPLAY=:0.0 xset -dpms
DISPLAY=:0.0 xset s noblank
<display images for a while>
Which command will undo the three xset-commands?

Greetings,
Kenneth

kenneho
Posts: 17
Joined: Thu Jul 28, 2016 2:33 pm

Re: Re-enable screen blanking in script

Sun Aug 14, 2016 6:24 pm

Never mind, it's as simple as this:

Code: Select all

xset s on
xset +dpms
xset s blank

Return to “Beginners”