# usb-crash-cart

Docker container wrapper for the NOTECONS02 USB Crash Cart Adapter software.

The vendor software (`usb-crash-cart-adapter` v20240517) was built against Ubuntu 16.04
(Python 2.7, wxWidgets 2.9/GTK2) and is incompatible with modern Fedora. This repo runs
it inside an Ubuntu 16.04 container with X11/XWayland passthrough.

## New host setup (one-time)

Clone the repo and install the udev rules so the crash cart adapter is accessible without root:

```bash
git clone git@git.sdgarren.com:scott/usb-crash-cart.git
cd usb-crash-cart
sudo ./install-udev-rules.sh
```

Reconnect the adapter if it was already plugged in.

## Running

Pull the pre-built image from the Gitea registry and launch:

```bash
docker pull git.sdgarren.com/scott/usb-crash-cart:latest
./docker-run.sh
```

`docker-run.sh` handles X11/XWayland socket sharing and USB device passthrough automatically.

## Notes

- The container uses `ubuntu:16.04` to match the original build environment.
- The app bundles its own `libpython2.7`, `libwx_gtk2u-2.9`, `libpng12`, etc. — the
  container only needs GTK2 and X11 system libs from the OS.
- On Fedora with Wayland, XWayland provides X11 compatibility — no extra configuration needed.
- The Docker image is built automatically by Gitea Actions on every push to `main`.
