diff --git a/README.md b/README.md index 10480ea..33e2ba3 100644 --- a/README.md +++ b/README.md @@ -39,6 +39,9 @@ apt install python3-pyinotify python3-rpi.gpio echo "dtoverlay=dwc2" >> /boot/config.txt +copy everything to /opt/freezer/ +add to /etc/rc.local: python3 /opt/freezer/display.py + readonly-root diff --git a/raspberry-environment/background.png b/raspberry-environment/background.png new file mode 100644 index 0000000..b74087f Binary files /dev/null and b/raspberry-environment/background.png differ diff --git a/raspberry-environment/pythonscript.py b/raspberry-environment/pythonscript.py index 2bb16db..94425f1 100644 --- a/raspberry-environment/pythonscript.py +++ b/raspberry-environment/pythonscript.py @@ -125,11 +125,10 @@ if __name__ == '__main__': #loop-mount #mkfs subprocess.run(['mkfs', '-t', 'vfat', '-n', 'SCREENSHOTS', '/tmp/usbdisk.img'], shell=False, check=True) - #subprocess.run(['mount', '-o', 'loop,ro', '-t', 'vfat', '/tmp/usbdisk.img', '/mnt'], shell=False, check=True) - # copy screenshot-tool.exe - # copy background.png - #subprocess.run(['umount', '/mnt'], shell=False, check=False) - + subprocess.run(['mount', '-o', 'loop,rw', '-t', 'vfat', '/tmp/usbdisk.img', '/mnt'], shell=False, check=True) + subprocess.run('cp /opt/freezer/background.png /mnt/', shell=True, check=True) + subprocess.run('cp /opt/freezer/freeze.exe /mnt/', shell=True, check=True) + subprocess.run(['umount', '/mnt'], shell=False, check=True) subprocess.run(['modprobe', 'g_mass_storage', 'file=/tmp/usbdisk.img', 'stall=0', 'removable=1', 'iSerialNumber=1234567890'], shell=False, check=True) #tvservice -p