tiny-pilot / tinypilot

Use your Raspberry Pi as a browser-based KVM.
https://tinypilotkvm.com
MIT License
3k stars 252 forks source link

Install `load-tc358743-edid.service` (and EDIDs) without Ansible #1598

Closed mtlynch closed 1 year ago

mtlynch commented 1 year ago

We currently install the load-tc358743-edid.service and the TC358743 EDIDs using Ansible. As part of the War on Ansible, we want to reimplement this in Debian packaging.

The load-tc358743-edid.service should be straightforward to port. It's currently a template, but it doesn't need to be because we can hardcode the EDIDs folder.

We currently use /home/ustreamer/edids as the EDIDs folder. It's technically an implementation detail, but we should preserve that location, as we have old forum posts and maybe some documentation that references that path.

We should also maintain the behavior that if the user overwrites the ustreamer_edid var in /home/tinypilot/settings.yml, then on the next install, TinyPilot should overwrite whatever is in /home/ustreamer/edids/tc358743-edid.hex with the contents of the ustreamer_edid var. If there's no ustreamer_edid var in /home/tinypilot/settings.yml, the installer should overwrite /home/ustreamer/edids/tc358743-edid.hex with the default EDID.

When I say "overwrite" it doesn't literally have to overwrite it, as we can use symlinks if that's cleaner. We do something similar here:

https://github.com/tiny-pilot/tinypilot/blob/701429338473d328e7d432067750b507d3296195/debian-pkg/debian/tinypilot.postinst#L126-L151