Chooses HDMI if available else display contents on touch screen
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Type Name Latest commit message Commit time
Failed to load latest commit information.


This code will is made and tested for the Raspberry Pi 3 but should work on any of the Pi's. 
The use is for Pi's that have a 7inch touch screen output device.
The code will select HDMI as the output if its available otherwise the other screen will work. 

steps to set it up on the pi
git clone
get directory of
for me its /home/pi/rpi_display_output/
add permission to all users with
chmod 777 /home/pi/rpi_display_output/

now it is time to edit the boot script
sudo nano /etc/rc.local
before exit 0
add the path to the script
for me its /home/pi/rpi_display_output/
save and exit ^x y enter