Advertisement
Guest User

raspberry pi screen on/off script

a guest
Feb 18th, 2020
209
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Bash 0.36 KB | None | 0 0
  1. #!/bin/sh
  2.  
  3. # Enable and disable HDMI output on the Raspberry Pi
  4.  
  5. case $1 in
  6.         off)
  7.                 xset dpms force standby
  8.                 vcgencmd display_power 0
  9.         ;;
  10.         on)
  11.                 vcgencmd display_power 1
  12.         ;;
  13.         *)
  14.                 echo "Usage: $0 on|off" >&2
  15.                 exit 2
  16.         ;;
  17. esac
  18.  
  19. exit 0
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement