Commit Graph

11 Commits (8eb6d78f6f8d3d01bddf96fc115f522500261519)

Author SHA1 Message Date
Dustin ad09bd2cdc Update hudctrl URI
dustin/basementhud/pipeline/head This commit looks good Details
Finally got the HUD controller published somewhere besides my desktop!
2022-08-03 17:09:56 -05:00
Dustin 5083b91871 Install mqttdpms
dustin/basementhud/pipeline/head This commit looks good Details
The `mqttdpms` tool will allow the screens to be turned off and on using
Home Assistant.  We'll install it into the rootfs image by copying the
artifact from its Jenkins build into the overlay tree before building
the image.
2022-08-02 23:04:22 -05:00
Dustin 51a2324a1c xinit: Run openbox-session
basementhud/pipeline/head This commit looks good Details
Running `openbox` does not invoke the autostart script.
2022-05-01 11:10:54 -05:00
Dustin aa6162d37a xinit: Trigger hudctrl after openbox starts
basementhud/pipeline/head This commit looks good Details
The window manager needs to be running before we trigger *hudctrl* to
open the Firefox windows, otherwise they will not be able to go into
fullscreen.
2022-05-01 10:30:06 -05:00
Dustin 01c8c116dd xinit: Trigger hudctrl at boot
basementhud/pipeline/head This commit looks good Details
The *hudctrl* service remotely controls Firefox on the Basement HUD
machine.  It uses Firefox Marionette over TCP, and is itself controlled
by an HTTP API.

When the HUD machine starts up, it sends its monitor configuration to
*hudctrl* and tells it the display is ready to be controlled remotely.

For now, *hudctrl* is hosed on Rosalina.  I will eventually move it to
the new metrics server, once it's built.
2022-05-01 09:22:48 -05:00
Dustin 878f733025 Set GUI time zone from geolocation
The wonderful *ipapi.co* service can help identify the time zone of a
device based on the geolocation information for its IP address.  We can
use this to set the `TZ` environment variable in the user session, which
Firefox will respect.  This has the effect of showing the correct time
in e.g. Grafana dashboards, without hard-coding the time zone in the
rootfs image.
2022-04-06 18:40:58 -05:00
Dustin c7a21b404d Start Firefox as soon as X starts
basementhud/pipeline/head This commit looks good Details
There's no reason to wait for an incoming Marionette connection to start
Firefox.  Anyway, starting it earlier avoids a bunch of "connection
refused" spam from `systemd-socket-proxyd`.
2022-04-06 17:48:45 -05:00
Dustin e055500476 Drop Playwright, run Firefox Marionette
Running Voonex (Python), Playwight (Node.js), and Firefox simultaneously
takes way too much memory.  Using the NBD swap prevents hard lockups and
crashes in OOM situations, but it makes the machine *incredibly* slow.
To avoid needing to push anything into the network swap, I want to try
and reduce the memory footprint as much as possible.  To that end, we
will go back to running just Firefox.  To control it, we will use the
Marionette protocol.

Firefox only allows control via Marionette over the loopback interface.
This is hard-coded in the Marionette server, and cannot be changed at
runtime.  To allow a remote machine (running Voonex) to control it, we
need to expose the socket to the network.  Fortunately, *systemd*
includes a tool for exactly this purpose: `systemd-socket-proxyd`.
2022-04-05 17:58:19 -05:00
Dustin a3c2afc3fa Install Playwright to control Firefox
[Playwright] is a cross-browser automation framework, intended for
automating browser-based GUI application tests.  It also works as a
general remote-control tool for automating basically anything having to
do with a browser.

Playwright requires a special Firefox binary that it manages itself.  To
avoid downloading and installing Playwright and Firefox, and thus
storing them in memory, we need them to be already available in the
rootfs image.  Since I want the control software to be updated easily,
without rebooting the machine, I decided to separate it into its own
project, [Voonex].  A short shell script to install/update and run it is
launched by the systemd user instance.

[Playwright]: https://playwright.dev/
[Voonex]: https://git.pyrocufflink.blue/dustin/voonex
2022-04-04 20:59:34 -05:00
Dustin 37ef563b5d Switch to Openbox
Matchbox Window Manager, being designed for mobile devices, does not
handle multiple monitors well.  It manages the monitors together as one
giant screen, which will make it extremely difficult to manage separate
Firefox windows on each screen.  Openbox is almost as lightweight as
Matchbox, but it works significantly better for this use case.
2022-04-04 20:59:34 -05:00
Dustin 2437e6e467 Initial commit 2022-04-04 20:59:32 -05:00