LordOS — a free, fast and secure GNU/Linux distribution based on Debian, with its own desktop environment: display server and Wayland compositor in C, a React UI engine on QuickJS, and private native apps.
C cdebiandesktop-environmentebpffirewalllandlocklinuxlinux-distributionopen-sourceprivacyquickjsraspberry-pi-5reactsecuritywaylandwayland-compositor
Merge branch 'v084-rtc-only'
Federico Pereira1a46d3f10761
diff --cc CHANGELOG.mdindex 845b913,e644351..55a5ce6--- a/CHANGELOG.md+++ b/CHANGELOG.md@@@ -21,46 -21,33 +21,60 @@@ of the matching [GitHub release](https:quit it. Chromium profiles from before this version that still use the LordOS frame are shown onthe page, with a button to change them too. A choice you made yourself in a Firefox `user.js`file is left alone, and choices you make later in the browsers' own settings stick.- - **Remote desktop as video.** In a browser that supports WebRTC, the remote desktop now arrives as- real video (H.264, or VP8 when the browser has no H.264) with the session's sound (Opus), instead- of images. Still areas are then made pixel-perfect with lossless tiles, so text stays sharp.- Dragging a window went from about 23 frames per second and 12.5 Mbit/s to about 28 frames per- second and under 1 Mbit/s, and the connection's own process from 57 % of a core to 2 %. The- session encodes once (on the graphics card with VA-API when it can, else in software) for every- viewer of that session; the screen keeps being composed on the graphics card while someone- watches. Keyboard, mouse and clipboard go over a WebRTC data channel. If the browser or the- network can't do WebRTC, it falls back to the images, as before.- - **Settings → Sharing → Video:** turn the video off (images only), add public STUN servers and a- TURN relay for connecting across networks. A built-in STUN server covers the local network, and+ - **Remote desktop as video.** The remote desktop now arrives as real video (H.264, or VP8 when the+ browser has no H.264) with the session's sound (Opus), instead of images. Still areas are then+ made pixel-perfect with lossless tiles, so text stays sharp. Dragging a window went from about 23+ frames per second and 12.5 Mbit/s to about 29 frames per second and under 1 Mbit/s, and the+ connection's own process from 57 % of a core to 2 %. The session encodes once (on the graphics+ card with VA-API when it can, else in software) for every viewer of that session; the screen keeps+ being composed on the graphics card while someone watches. Keyboard, mouse and clipboard go over a+ WebRTC data channel. Video is the only way the remote desktop works (see Removed).+ - **The remote desktop works where UDP is blocked.** Besides UDP, the video also connects over TCP+ on the remote desktop's own port (5673), so a firewall or VPN that only lets that port through+ is enough; on the local network nothing else is needed. With UDP blocked, video plays about 2 s+ after the page loads.+ - **The remote desktop reconnects by itself.** When the network drops or changes, the page keeps the+ last frame with a "Reconnecting…" note and recovers on its own, without signing in again: first+ on the same encrypted connection (back within a fraction of a second once the network returns,+ after a 20-second outage), then with a new one, then with a new connection to the computer after+ longer outages (75 seconds were tested).+ - **Clear messages when it can't connect.** If there is really no way through, the page says why+ (nothing gets through over UDP or TCP, the encrypted channel couldn't be set up, the connection+ was lost, the browser can't play the video…) and what to do, with a Try again button. A browser+ without WebRTC, or without H.264 and VP8, gets a page that lists what it needs.+ - **Settings → Sharing → Connection:** add public STUN servers and a TURN relay for connecting across+ networks, reached over UDP, TCP or TLS (port 443 works). Over TLS the relay's certificate is+ checked against the system's certificate authorities and its name, or against a fingerprint you+ paste for a relay with its own certificate. A built-in STUN server covers the local network, andnothing reaches outside servers unless you add them. The relay's password stays on the computer,readable only by the system, and is never sent to the browser.+- **LordOS Imager.** Write LordOS to an SD card or a USB stick and have the Raspberry Pi 5 start+ ready to use: choose the device (Raspberry Pi 5, or a PC from a USB stick), the system image (the+ latest signed release, downloaded once and resumed if interrupted, or a file of your own with a+ clear warning) and the drive (only SD cards and USB drives; internal disks and the disk the+ computer runs from are never shown), then customise the first boot: computer name, language,+ time zone, keyboard, your account (only a hash of the password goes on the card), Wi-Fi (only the+ derived key), SSH with keys or a password, LordOS remote desktop (local network only), Bluetooth,+ Lord Default or Classic in light or dark with your accent, and cooling (case with a fan, active+ cooler, passive case or nothing, with a matching profile and an optional mild overclock with a+ fan). Lumo gives a tip at every step and celebrates at the end. Every official image is checked+ against the LordOS release signature before anything is erased, and every card is read back and+ compared after writing; cancelling clears the card. In English, Spanish and Portuguese, with+ keyboard navigation. See [docs/IMAGER.md](docs/IMAGER.md).+- **The LordOS Imager for other computers**: the same app for the three common desktop platforms (Tauri, about+ 6 MB), sharing the interface with the one in LordOS. Built from the source for now; signed+ downloads will come with a release.+- **First-run file on the Raspberry Pi** (`lordos-firstrun.txt` on the boot partition): read once on+ the first boot by `lordos-firstrun`, strictly validated (nothing is applied if any part is wrong),+ then overwritten and deleted. See [docs/RASPBERRY.md](docs/RASPBERRY.md), "First boot".++### Security++- The imager's privileged part is four closed actions: downloads run `curl` as the user against two+ fixed URL shapes; writing accepts only a whole removable disk whose size, model and serial are+ re-checked right before it is opened exclusively, decompresses with `xz` running as the user, and+ never writes an official image whose signature or hash doesn't match. Over 2 TiB is refused.+- Saved Wi-Fi networks may hold a derived WPA2 key (`psk=`) instead of the password.### Changeddiff --cc assets/locales/en/errors.jsonindex df68310,6a4b648..59413a7--- a/assets/locales/en/errors.json+++ b/assets/locales/en/errors.json@@@ -570,33 -570,5 +570,34 @@@"remote.badIceServer": "Not a valid server: use name:port, like stun.example.org:3478 (at most 4)","remote.badTurnUser": "Not a valid relay user name (no spaces, at most 128 characters)","remote.badTurnPassword": "Not a valid relay password (at most 128 characters, no line breaks)",+ "imager.cacheFailed": "The imager's download folder (~/.cache/lordos/imager) can't be used",+ "imager.noCurl": "The download tool (curl) isn't installed",+ "imager.fetchCancelled": "Download cancelled",+ "imager.fetchTooLarge": "The download is larger than expected",+ "imager.fetchNotFound": "The release file wasn't found",+ "imager.fetchNetwork": "No connection to the LordOS releases page",+ "imager.fetchFailed": "The download failed (code {code})",+ "imager.nothingRunning": "Nothing is being downloaded",+ "imager.notRemovable": "{name} is not a removable drive: the imager only writes SD cards and USB drives",+ "imager.readOnly": "{name} is write-protected",+ "imager.diskChanged": "{name} is not the drive that was chosen (it changed or was replaced)",+ "imager.badImageName": "That file isn't an .img, .img.xz or .iso image",+ "imager.xzDamaged": "The .xz image is damaged or incomplete",+ "imager.noXz": "The .xz tool (xz-utils) isn't installed",+ "imager.noSignature": "The release signature files couldn't be read",+ "imager.badSignature": "The release signature doesn't match the LordOS key",+ "imager.notListed": "The signed list doesn't include {name}",+ "imager.hashMismatch": "The image doesn't match its signed SHA-256: it was not written",+ "imager.cancelledWiped": "Cancelled: the drive was cleared",+ "imager.xzFailed": "The image couldn't be decompressed",+ "imager.imageChanged": "The image file changed while it was written: the drive was cleared",+ "imager.driveTooLarge": "{name} is larger than 2 TiB: LordOS images can't use it",+ "imager.notAuthorized": "Writing to the drive wasn't allowed",+ "imager.listFailed": "The drives couldn't be listed",+ "imager.bootNotFound": "The card's boot partition didn't appear",+ "imager.ejectFailed": "The drive couldn't be ejected",+ "imager.noUdisks": "The disk service (udisks2) isn't running",+ "imager.hashFailed": "The password couldn't be hashed",- "imager.pskFailed": "The Wi-Fi key couldn't be derived"++ "imager.pskFailed": "The Wi-Fi key couldn't be derived",+ "remote.badTurnFingerprint": "Not a valid certificate fingerprint: 64 hexadecimal digits (pairs may be separated by colons)"}diff --cc assets/locales/es/errors.jsonindex 1445515,b7a5158..1865a74--- a/assets/locales/es/errors.json+++ b/assets/locales/es/errors.json@@@ -570,33 -570,5 +570,34 @@@"remote.badIceServer": "No es un servidor válido: usá nombre:puerto, como stun.ejemplo.org:3478 (como mucho 4)","remote.badTurnUser": "No es un usuario de relé válido (sin espacios, hasta 128 caracteres)","remote.badTurnPassword": "No es una contraseña de relé válida (hasta 128 caracteres, sin saltos de línea)",+ "imager.cacheFailed": "No se puede usar la carpeta de descargas del grabador (~/.cache/lordos/imager)",+ "imager.noCurl": "La herramienta de descarga (curl) no está instalada",+ "imager.fetchCancelled": "Descarga cancelada",+ "imager.fetchTooLarge": "La descarga es más grande de lo esperado",+ "imager.fetchNotFound": "No se encontró el archivo de la versión",+ "imager.fetchNetwork": "No hay conexión con la página de versiones de LordOS",+ "imager.fetchFailed": "La descarga falló (código {code})",+ "imager.nothingRunning": "No se está descargando nada",+ "imager.notRemovable": "{name} no es una unidad extraíble: el grabador solo graba tarjetas SD y unidades USB",+ "imager.readOnly": "{name} está protegida contra escritura",+ "imager.diskChanged": "{name} no es la unidad elegida (cambió o la reemplazaron)",+ "imager.badImageName": "Ese archivo no es una imagen .img, .img.xz o .iso",+ "imager.xzDamaged": "La imagen .xz está dañada o incompleta",+ "imager.noXz": "La herramienta .xz (xz-utils) no está instalada",+ "imager.noSignature": "No se pudieron leer los archivos de firma de la versión",+ "imager.badSignature": "La firma de la versión no coincide con la clave de LordOS",+ "imager.notListed": "La lista firmada no incluye {name}",+ "imager.hashMismatch": "La imagen no coincide con su SHA-256 firmado: no se grabó",+ "imager.cancelledWiped": "Cancelado: la unidad quedó limpia",+ "imager.xzFailed": "No se pudo descomprimir la imagen",+ "imager.imageChanged": "El archivo de imagen cambió mientras se grababa: la unidad quedó limpia",+ "imager.driveTooLarge": "{name} tiene más de 2 TiB: las imágenes de LordOS no pueden usarla",+ "imager.notAuthorized": "No se permitió grabar en la unidad",+ "imager.listFailed": "No se pudieron listar las unidades",+ "imager.bootNotFound": "No apareció la partición de arranque de la tarjeta",+ "imager.ejectFailed": "No se pudo expulsar la unidad",+ "imager.noUdisks": "El servicio de discos (udisks2) no está funcionando",+ "imager.hashFailed": "No se pudo calcular el hash de la contraseña",- "imager.pskFailed": "No se pudo derivar la clave del Wi-Fi"++ "imager.pskFailed": "No se pudo derivar la clave del Wi-Fi",+ "remote.badTurnFingerprint": "No es una huella de certificado válida: 64 dígitos hexadecimales (los pares pueden ir separados por dos puntos)"}diff --cc assets/locales/pt/errors.jsonindex 1dba12b,29f6794..ebe7491--- a/assets/locales/pt/errors.json+++ b/assets/locales/pt/errors.json@@@ -570,33 -570,5 +570,34 @@@"remote.badIceServer": "Não é um servidor válido: use nome:porta, como stun.exemplo.org:3478 (no máximo 4)","remote.badTurnUser": "Não é um usuário de retransmissor válido (sem espaços, até 128 caracteres)","remote.badTurnPassword": "Não é uma senha de retransmissor válida (até 128 caracteres, sem quebras de linha)",+ "imager.cacheFailed": "Não é possível usar a pasta de downloads do gravador (~/.cache/lordos/imager)",+ "imager.noCurl": "A ferramenta de download (curl) não está instalada",+ "imager.fetchCancelled": "Download cancelado",+ "imager.fetchTooLarge": "O download é maior do que o esperado",+ "imager.fetchNotFound": "O arquivo da versão não foi encontrado",+ "imager.fetchNetwork": "Sem conexão com a página de versões do LordOS",+ "imager.fetchFailed": "O download falhou (código {code})",+ "imager.nothingRunning": "Nada está sendo baixado",+ "imager.notRemovable": "{name} não é uma unidade removível: o gravador só grava cartões SD e unidades USB",+ "imager.readOnly": "{name} está protegido contra gravação",+ "imager.diskChanged": "{name} não é a unidade escolhida (ela mudou ou foi trocada)",+ "imager.badImageName": "Esse arquivo não é uma imagem .img, .img.xz ou .iso",+ "imager.xzDamaged": "A imagem .xz está danificada ou incompleta",+ "imager.noXz": "A ferramenta .xz (xz-utils) não está instalada",+ "imager.noSignature": "Não foi possível ler os arquivos de assinatura da versão",+ "imager.badSignature": "A assinatura da versão não confere com a chave do LordOS",+ "imager.notListed": "A lista assinada não inclui {name}",+ "imager.hashMismatch": "A imagem não confere com o seu SHA-256 assinado: ela não foi gravada",+ "imager.cancelledWiped": "Cancelado: a unidade foi limpa",+ "imager.xzFailed": "Não foi possível descompactar a imagem",+ "imager.imageChanged": "O arquivo de imagem mudou durante a gravação: a unidade foi limpa",+ "imager.driveTooLarge": "{name} tem mais de 2 TiB: as imagens do LordOS não podem usá-la",+ "imager.notAuthorized": "A gravação na unidade não foi permitida",+ "imager.listFailed": "Não foi possível listar as unidades",+ "imager.bootNotFound": "A partição de boot do cartão não apareceu",+ "imager.ejectFailed": "Não foi possível ejetar a unidade",+ "imager.noUdisks": "O serviço de discos (udisks2) não está funcionando",+ "imager.hashFailed": "Não foi possível calcular o hash da senha",- "imager.pskFailed": "Não foi possível derivar a chave do Wi-Fi"++ "imager.pskFailed": "Não foi possível derivar a chave do Wi-Fi",+ "remote.badTurnFingerprint": "Não é uma impressão digital de certificado válida: 64 dígitos hexadecimais (os pares podem ser separados por dois-pontos)"}diff --cc docs/VM-SETUP.mdindex b2fa5ab,4ab1e17..2704c87--- a/docs/VM-SETUP.md+++ b/docs/VM-SETUP.md@@@ -1478,39 -1478,47 +1478,84 @@@ See `RASPBERRY.md` ("The LordOS kernel"(this board's lacks `cgroup_enable=memory`, so `verify-board` reports the memory controller asFAIL; the image's has it).-## Step 42 — 0.8.4: the remote desktop WebRTC only (VM 122 `lordos-sandbox`, October 19)+## Step 42 — 0.8.4: LordOS Imager (VM 116 `lordos-gpu`, October 19)++See `IMAGER.md`. Tree in `~/LordOS-imager`, built there (`make -C server`, `make -C server test`:+23 passed, the imager suites included) and installed over `/usr/local/lib/lordos` by+`~/deploy-imager-116.sh`, which first saved `/usr/local/lib/lordos` and lord's `settings.json` in+`/var/backups/lordos-imager-bak`.++- **A scratch disk:** `qm set 116 --scsi1 local-lvm:24,discard=on` on the Proxmox host (as VM 119's+ `sata1` before it), formatted ext4 (label `imgscratch`) and mounted at `/var/tmp/imager-scratch`+ (not in fstab); `~/ImagerTest` was a bind mount of its `user/` folder, so test images sat in the+ home folder as the imager requires. It also served as the internal, non-removable disk the+ imager must refuse.+- **A virtual USB stick:** `modprobe dummy_hcd` and `modprobe g_mass_storage+ file=/var/tmp/imager-scratch/usb-stick-116.img removable=1` (4 GB, then 16 GB, sparse): `sdc`,+ `TRAN usb`, `RM 1`. Every write was preceded by `~/ImagerTest/vguard.sh sdc`, which prints the+ device and stops unless it is that gadget with the backing file's size. No other disk was written.+- **Images:** the signed 0.8.1 release folder copied from the development machine, and 0.8.3+ downloaded from GitHub by `imager-fetch` into `~/.cache/lordos/imager`.+- **Session:** `/etc/lordos/session.conf` with `AUTOLOGIN=lord` (it didn't exist) and lord's+ `settings.json` set to English, both put back at the end; the locked `pwtest` session from an earlier+ test was ended by the service restarts.+- **The Linux download (Tauri) inside the LordOS session:** installed for the test only+ `libwebkit2gtk-4.1-0` and `udisks2` with their dependencies (61 packages, listed in+ `~/ImagerTest/linux-test-packages.txt`), and `/etc/polkit-1/rules.d/49-lordos-imager-test.rules`+ allowing `lord` the udisks2 open/mount/eject actions (the LordOS session has no polkit agent to+ ask); the app ran as a Wayland client with `WAYLAND_DISPLAY=wayland-0`. All of it was removed at+ the end (`apt-get purge` of those packages, then the rule).+- **Screenshots** with `qm monitor 116` (`screendump`) from the Proxmox host, the pointer with+ `/root/lord-qmp-input.py 116` and keys with `/root/lord-type.py 116`.+- **Undone at the end:** `/usr/local/lib/lordos` restored from the backup, `session.conf` removed and+ lord's `settings.json` restored, `lordos.service` restarted to the login screen; the gadget+ unloaded (`rmmod g_mass_storage dummy_hcd`), the bind mount and the scratch mount removed, and the+ scratch disk detached and deleted from the VM (`qm set 116 --delete scsi1`, then the unused volume+ removed); `~/ImagerTest`, `~/.cache/lordos/imager`, `~/.config/LordOS Imager` and the test key and+ image files deleted. `~/LordOS-imager` (the tree) is kept, like the other agents' trees. No network+ or Proxmox setting other than the scratch disk was touched.++++## Step 43 — 0.8.4: the remote desktop WebRTC only (VM 122 `lordos-sandbox`, October 19)++ See `REMOTE.md`, "Video (WebRTC)", "ICE over TCP", "Reconnecting" and "When it can't connect". On+ VM 122 (172.17.0.56), tree in `~/LordOS-rtc2` (copied from the Mac's `v084-rtc-only` worktree with+ `tar` over SSH: the VM has no `rsync`), built there (`make -C server`, `make -C server test`) and+ installed over the package's files by `~/deploy-rtc2-122.sh`, which needed the backup of+ `/usr/lib/lordos`, `/etc/lordos`, `/var/lib/lordos/remote`, `/var/lib/lordos/last-user`, the+ `iptables-save` output and the package selections in `/var/backups/lordos-rtc2-20261019` first+ (`~/restore-rtc2-122.sh` put them back). The theme bundles were built on the Mac (the VM has no Node).+ For the before/after measurements, `main`'s `server/` was built in `~/LordOS-rtc2-base` and its three+ binaries installed for one round, then this branch's again.++ - **Installed for the build:** `libsrtp2-dev` and `libusrsctp-dev` (with `libsrtp2-1`, `libusrsctp2`,+ `libnss3-dev`, `libnspr4-dev`); purged at the end.+ - **Installed for the TURN tests:** `coturn` (`--no-install-recommends`, with `inetutils-telnet`,+ `telnet`, `libevent-extra-2.1-7t64`, `libevent-openssl-2.1-7t64`, `libevent-pthreads-2.1-7t64`,+ `libhiredis1.1.0`, `libmariadb3`, `libpq5`, `mariadb-common`, `mysql-common`, `sqlite3`); its unit+ was disabled and stopped right after installing, and `turnserver` ran by hand on 172.17.0.56 (3478+ UDP/TCP, 5349 TLS with a throwaway self-signed P-256 certificate, relay ports 49160–49200) with a+ test-only user from `/tmp/turn-rtc2/turn.conf`. Purged at the end; `/tmp/turn-rtc2` removed.+ - **Firewall rules for the tests only:** `iptables` (the nftables backend, already installed) on the+ VM's INPUT chain, only for the Mac's address (172.17.0.5): drop UDP; drop TCP 5673; drop new TCP+ connections to 5673 beyond the first (`connlimit`, so the WebSocket stays and ICE-TCP can't); drop+ UDP except the relay ports. Each rule was deleted right after its test; eth0 and the VM's network+ configuration were never touched. The rules left an empty `ip filter` table behind, removed with+ `nft delete table ip filter` (`nftables` installed for that one command and purged), so+ `iptables-save` is empty again, as before.+ - **Test-only accounts** `rtest` and `rtest2` (one password, only for these tests); `rtest` was put+ in `sudo` for Settings → Sharing → Connection (the `remote-ice` action through the UI) and its+ screenshots. Both deleted with their homes at the end (their `/run/lordos/spawn-<uid>.lock` too).+ - **Browsers:** headless Chrome on the Mac with throwaway profiles in the scratchpad, driven over the+ DevTools protocol; the ICE and ICE-TCP probes (`/tmp/iceprobe-rtc2.py`) ran from the VM itself as a+ second address; CPU and traffic from `/proc` and `eth0` (`/tmp/cpu-rtc2.py`). The fuzzer's 1,000,000+ input run: `./build/remote-fuzz 1000000 7` (2 min 29 s).+ - **Configuration changed during the tests** (all restored from the backup): `config` (`turn*` lines+ written by hand and by Settings, `net=list` for one test, `net=lan` written by Settings), `access`+ (one test `allow` line), `turn.key`. One `systemctl kill -s HUP lordos` signalled the whole unit+ instead of only `lord-sessiond`, so `lord-netd` restarted once ("the network was not interrupted");+ use `systemctl reload lordos` (`ExecReload` sends SIGHUP to the main process only).+ - **Undone at the end:** `/usr/lib/lordos`, `/etc/lordos`, `/var/lib/lordos/remote` and `last-user`+ restored (`diff -r` empty), the packages above purged (`dpkg --get-selections` identical to before),+ `iptables-save` as before, the test accounts, both trees, the scripts, the `/tmp` files and the+ backup removed, `lordos.service` restarted on the package's binaries, at the login screen.+ VMs 115, 106 and 123 were not used.