dustin/photoframe2/pipeline/pr-main This commit looks goodDetails
The `photoframe` script was based on the one used by the original
Buildroot-based photo frame system. I've split it into two processes,
though: one to listen to the URL stream and download new photos as
instructed by the server, and another to actually display the photos.
Getting `feh` and Firefox to both be fullscreen at the same time was
difficult, and only works if they are on separate Sway workspaces. Thus,
"activating" the slide show means switching to the workspace where `feh`
is and "deactivating" it means switching back to Firefox's workspace.
_systemd-networkd_ uses a randomly-generated ID as the DHCP client
identifier by default. On Aimee OS, it is not able to persist this ID
between boots; I think it may derive the value from the machine ID. To
avoid getting a new IP address every boot, we can configure it to use
the MAC address of the device as the DHCP client ID.
To minimize unexpected changes between builds, I'm going to schedule a
separate task to sync the Portage repositories. This way, we know that
two runs in a row from the same source will have the same packages,
unless we have specifically updated Portage.
This thing is pointless.
Unfortunately, we cannot use Portage's `INSTALL_MASK` feature as it
doesn't work for symbolic links. Since _systemd_ installs symlinks in
`/etc/ssh` that point to files we would mask, those symlinks would point
to nothing, which would cause `sshd` to fail to start as it is unable to
open those files. Thus, we have to omit these files by excluding them
from the squashfs image.
Getting the Raspberry Pi 4 GPU and 7-inch Touch Display 2 working was
quite challenging. Several kernel drivers are needed, beyond the
obvious VC4 and V3D, like voltage regulators and backlight controls.
Even with all the drivers enabled, I still had trouble getting
`/dev/dri/card1` (the display device, as opposed to `/dev/dri/card0`,
the 3D rendering device) to appear until I explicitly enabled the
`vc4-kms-dsi-ili9881-7inch` device tree overlay. I am not entirely sure
why this is necessary, since `display_auto_detect` supposedly should
have added this overlay automatically. I am also not sure how it would
work if I wanted to use an HDMI monitor instead of the DSI panel, but
fortunately, for this project, that's not necessary.
This commit introduces the _kiosk.service_ unit, which launches `sway`
to start a Wayland session, which in turn launches Firefox. The
`policies.json` file configures Firefox in a sort of kiosk mode,
disabling most features and blocking all but the desginated sites.
Unfortunately, running `firefox --kiosk` doesn't actually work: Firefox
apparently runs, but doesn't draw anything on the screen.
Note that we have to launch Firefox by its "real" path, since
`/usr/bin/firefox` is a Bash script, and Bash is not installed.
Fortunately, the wrapper script doesn't do anything we really care
about, so bypassing it is fine.