You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Commit 95152a9
Browse filesBrowse the repository at this point in the historyBrowse files
`docker-baseimage-selkies` is the packaging layer of the platform, the image every Webtop and single application container is built FROM. It assembles the whole runtime, the compositor stack, Selkies, pixelflux and pcmflux, Nginx, PulseAudio, GPU detection, hardening, and the LinuxServer.io s6 service machinery, so that a downstream image only has to install an application and say how to start it.
5
+
`docker-baseimage-selkies` is the packaging layer of the platform, the image every Webtop and single application container is built FROM. It installs the Selkies release bundle onto a LinuxServer.io distro base and adds GPU detection, gamepad and webcam device setup, hardening, and the LinuxServer.io s6 service machinery, so that a downstream image only has to install an application and say how to start it.
6
6
7
7
This page is the component overview. The [Developer Guide](../developer-guide/index.md) covers building on it ([Building Custom Images](../developer-guide/building-images.md)) and its internals in depth ([Baseimage Internals](../developer-guide/baseimage-internals.md)).
8
8
@@ -19,44 +19,40 @@ One branch and tag per base distribution, all for x86_64 and aarch64:
19
19
| Kali |`kali`|
20
20
| Ubuntu |`ubunturesolute`|
21
21
22
-
There is deliberately **no `latest` tag** for base images. Downstream images pin a distro tag, for example `FROM ghcr.io/linuxserver/baseimage-selkies:debiantrixie`.
22
+
There is deliberately **no `latest` tag** for base images. Downstream images pin a distro tag, for example `FROM ghcr.io/linuxserver/baseimage-selkies:debiantrixie`. A `dev` tag, based on the latest Ubuntu and the head of the Selkies codebase, exists for integration testing.
23
23
24
24
## What is inside
25
25
26
26
-**The LSIO foundation**: each tag builds on the corresponding LinuxServer.io distro baseimage, inheriting s6-overlay init, the `abc` user with PUID and PGID remapping, `TZ`, Docker mods, and the `/custom-cont-init.d` and `/custom-services.d` hooks.
27
-
-**Selkies** (pinned release) installed into the `/lsiopy` virtualenv, with pixelflux 2.x and pcmflux 2.x, plus [Pelorus](pelorus.md) preinstalled.
28
-
-**The web client**: prebuilt dashboards under `/usr/share/selkies/`, selected at runtime by the `DASHBOARD` variable.
29
-
-**Display servers for both stacks**: labwc (built from source with two small patches: the IPC socket Pelorus queries windows over, and a control socket Selkies asks for a second screen over) for Wayland, and an XLibre Xvfb built with glamor and DRI3 plus Openbox for X11. The Xvfb carries four LinuxServer patches: the screen pixmap lives on the GPU and the framebuffer follows RandR resizes, which is what makes zero copy capture possible on X11; it starts with spare outputs a second display is plugged into as a real monitor; DRI3 presents synchronize explicitly through timeline syncobjs where the driver supports them; and its fake vblank runs at the rate the session is captured at. Both are prebuilt per distro in [selkies-layers](https://github.com/linuxserver/selkies-layers) and copied into the image, along with wlroots 0.19.3 on distros that do not package it.
30
-
-**[Selkies Desktop](selkies-desktop.md)** at `/usr/bin/selkies-desktop`, activated by env var.
31
-
-**Nginx** serving the client, proxying everything under `/api` (the WebSocket, WebRTC signaling, files, printing, and the operator API) to Selkies, handling basic auth, the subfolder prefix, and the `/pelorus/` proxy.
32
-
-**PulseAudio** with null sinks (`output` and `input`) wired for stream audio and microphone return.
33
-
-**Gamepad plumbing**: the input interposer and fake udev libraries, preloaded globally, with device nodes created at init.
34
-
-**Printing**: `cups-daemon` and `cups-filters`, which Selkies runs as the session user so a printed document reaches the browser.
35
-
-**Quality of life**: passwordless sudo for the desktop user, all system locales prebuilt for `LC_ALL`, `proot-apps` synced into the user home for persistent app installs, Docker in Docker support for privileged containers, and notification support.
27
+
-**The Selkies bundle** for the pinned release, unpacked at `/opt/selkies` (the glibc build, or musl on Alpine), with `selkies` and `selkies-desktop` on `/usr/bin`. It is one self contained install: the [Selkies](selkies.md) server with its web client compiled in, [pixelflux and pcmflux](pixelflux.md), the [Selkies window manager and desktop shell](selkies-desktop.md), [Pelorus](pelorus.md), a patched XLibre Xvfb, Xwayland, PulseAudio, `dbus-daemon`, and CUPS. Nothing is compiled in the image, and no labwc, Openbox, Nginx, or separate X server is installed.
28
+
-**The interposers**: the input interposer, the V4L2 webcam interposer, and fake udev, copied out of the bundle to `/usr/lib/selkies_input_interposer.so`, `/usr/lib/selkies_v4l2_interposer.so`, and `/opt/lib/libudev.so.1.0.0-fake`, with 32 bit builds beside each.
29
+
-**The web client on disk**: a copy of the stock client at `/usr/share/selkies/web`, branded with the image's icon and title, for hosts such as SealSkin that serve the client themselves. Selkies serves its own embedded copy.
30
+
-**GPU userspace**: Mesa, VA-API drivers (including Intel's media driver and the i965 shaders on x86_64), Vulkan loaders, and the Nvidia EGL glue for Wayland and GBM.
31
+
-**Quality of life**: passwordless sudo for the desktop user, a terminal (`xfce4-terminal` for X11, `foot` for Wayland), locale generation on demand for `LC_ALL`, `proot-apps` synced into the user home for persistent app installs, the built in [Steam installer](../user-guide/installing-apps.md#steam-built-in-reinstalls-itself), and Docker in Docker support for privileged containers with Docker itself fetched on first start.
36
32
37
33
## The runtime in one diagram
38
34
39
35
```mermaid
40
36
graph TD
41
37
subgraph s6 services
42
-
NGINX[svc-nginx]
43
-
PULSE[svc-pulseaudio]
44
-
SELKIES[svc-selkies: the selkies server]
45
-
DE[svc-de: startwm script]
46
-
WD[svc-watchdog: RESTART_APP]
38
+
SELKIES[svc-selkies: selkies session as abc]
39
+
DOCKER[svc-docker: dockerd when privileged]
40
+
EXIT[svc-app-exit: EXIT_ON_APP_CLOSE]
47
41
end
48
-
SELKIES -->|starts in process| PF[pixelflux Wayland compositor, socket wayland-1]
49
-
DE -->|waits for wayland-1| LABWC[labwc or a full DE, exposes wayland-0]
SELKIES --> WM[Selkies window manager and optional desktop shell]
46
+
SELKIES --> DE[startwm script: placeholder or a full desktop]
47
+
WM --> APP[autostart application]
52
48
```
53
49
54
-
At startup a chain of one shot init scripts configures everything from environment variables: Nginx substitution (ports, auth, subfolder, title), Wayland or X11 mode selection, first run copy of the autostart and menu defaults into `/config`, hardening (the `HARDEN_*` and `DISABLE_*` family), GPU detection and permission fixes, and gamepad device setup. Then the long running services above come up in dependency order.
50
+
At startup a chain of one shot init scripts translates the container variables into Selkies settings: Wayland or X11 mode selection, first run copy of the autostart into `/config`, the image's `menu.xml`into `/etc/xdg`, whether the built in window manager runs, hardening (the `HARDEN_*` and `DISABLE_*` family and their window manager equivalents), GPU detection and permission fixes, and gamepad and webcam device setup. Then `svc-selkies` starts `selkies session`, which brings up everything else.
55
51
56
52
## The two session modes
57
53
58
-
-**Wayland**: pixelflux hosts the virtual compositor; labwc (single apps) or a full desktop (Webtop flavors) nests on it. `PIXELFLUX_WAYLAND=true` is baked into images whose application or desktop runs on Wayland.
59
-
-**X11**: XLibre Xvfb with glamor and DRI3 on `:1`, Openbox for single apps or the desktop's own window manager, and pixelflux capturing the GPU resident screen through DRI3. Selected with `PIXELFLUX_WAYLAND=false`, and the stack for applications and desktops that run best on X11.
54
+
-**Wayland**: Selkies hosts the virtual compositor in process. Single application images put their windows straight on it under the Selkies window manager, which also runs Xwayland for X11 applications; full desktop Webtops nest their own compositor (KWin, labwc, Sway) on it. `PIXELFLUX_WAYLAND=true` is baked into images whose application or desktop runs on Wayland.
55
+
-**X11**: the bundle's XLibre Xvfb on `:1`, with its screen on the GPU through glamor and DRI3 when one is mounted, managed by the Selkies window manager for single apps or the desktop's own window manager. Selected with `PIXELFLUX_WAYLAND=false`, and the stack for applications and desktops that run best on X11.
60
56
61
57
Both stacks encode with zero copy on a GPU and share the same CPU encoders without one.
62
58
@@ -66,13 +62,13 @@ A downstream image customizes the base by providing a handful of well known file
66
62
67
63
| File | Purpose |
68
64
| --- | --- |
69
-
|`/defaults/autostart_wayland` and `/defaults/autostart`| The command that launches your app (Wayland and X11 variants) |
70
-
|`/defaults/menu_wayland.xml` and `/defaults/menu.xml`|The right click root menu |
65
+
|`/defaults/autostart_wayland` and `/defaults/autostart`| The command that launches your app (Wayland and X11 variants), run and supervised by the window manager|
66
+
|`/defaults/menu_wayland.xml` and `/defaults/menu.xml`|Optional entries for the right click root menu, added above the built in ones|
71
67
|`/defaults/startwm_wayland.sh` and `/defaults/startwm.sh`| Replace the whole session for full desktop images |
72
-
|`/usr/share/selkies/www/icon.png`| The app icon used for the PWA and favicon|
68
+
|`/usr/share/selkies/www/icon.png`| The app icon used for the favicon, the installed web app, and the dashboard|
73
69
74
70
Plus `ENV TITLE`, and whatever packages the app needs. That is the entire interface, [Building Custom Images](../developer-guide/building-images.md) walks through real examples.
75
71
76
72
## Versioning and builds
77
73
78
-
Images rebuild on a weekly package check cadence and on baseimage changes, through the standard LinuxServer.io Jenkins pipeline. Each downstream repository (chromium, webtop, and the rest of the fleet) is triggered from its own upstream signal, app version bumps or OS package updates, so the whole catalog stays current without manual intervention.
74
+
Images rebuild on a weekly package check cadence and on baseimage changes, through the standard LinuxServer.io Jenkins pipeline. The Selkies release is pinned with the `SELKIES_RELEASE` build argument. Each downstream repository (chromium, webtop, and the rest of the fleet) is triggered from its own upstream signal, app version bumps or OS package updates, so the whole catalog stays current without manual intervention.
Copy file name to clipboardExpand all lines: docs/selkies/components/index.md
+15-17Lines changed: 15 additions & 17 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -16,51 +16,49 @@ graph TD
16
16
REG[SealSkin apps registry]
17
17
end
18
18
subgraph "App containers (one per session)"
19
-
NG[Nginx]
20
19
SEL[Selkies server]
21
20
PF[Pixelflux video]
22
21
PCM[Pcmflux audio]
23
22
PEL[Pelorus]
24
-
WM[labwc or KDE Plasma]
23
+
WM[Selkies window manager, or KDE Plasma and other desktops]
25
24
SD[Selkies Desktop shell]
26
25
APP[Application]
27
26
end
28
-
BI[docker-baseimage-selkies] -.packages everything above the line.-> NG
27
+
BI[docker-baseimage-selkies] -.packages everything above the line.-> SEL
29
28
EXT --> SS
30
29
SS --> REG
31
-
SS -->|launches| NG
32
-
BR --> NG
30
+
SS -->|launches| SEL
31
+
BR --> SEL
33
32
AI --> PEL
34
-
NG --> SEL
33
+
PEL --> SEL
35
34
SEL --> PF
36
35
SEL --> PCM
37
36
PF --> WM
38
37
WM --> APP
39
38
SD -.optional shell.-> WM
40
-
PEL -.optional agent API.-> WM
41
39
```
42
40
43
41
## The projects
44
42
45
43
| Component | One line | Layer |
46
44
| --- | --- | --- |
47
-
|[Selkies](selkies.md)| The streaming serverand web client: WebSocket protocol, input, audio, clipboard, files, sharing | Session server |
48
-
|[Pixelflux and Pcmflux](pixelflux.md)| Capture and encoding engines for video (including the in process Wayland compositor) and audio | Media pipeline |
49
-
|[Selkies Baseimages](baseimages.md)| The OCI baseimages that package the whole stack with s6, Nginx, GPU detection, and LSIO conventions | Packaging |
50
-
|[Selkies Desktop](selkies-desktop.md)|A tiny panel, start menu, taskbar, and desktop icon shell for single app containers | Optional shell |
45
+
|[Selkies](selkies.md)| The streaming server, session launcher, and web client in one Rust executable: protocol, HTTP, input, audio, clipboard, files, sharing | Session server |
46
+
|[Pixelflux and Pcmflux](pixelflux.md)| Capture and encoding engines for video (including the in process Wayland compositor) and audio, Rust crates of the Selkies repository| Media pipeline |
47
+
|[Selkies Baseimages](baseimages.md)| The OCI baseimages that package the Selkies bundle with s6, GPU detection, hardening, and LSIO conventions | Packaging |
48
+
|[Selkies Desktop and Window Manager](selkies-desktop.md)|The built in window manager for single app containers, and the panel, start menu, and desktop shell over it | Window management and shell |
51
49
|[SealSkin](sealskin.md)| Self hosted orchestration: users, auth, on demand container launching, extensions, and mobile apps | Orchestration |
52
50
|[SealSkin Apps Registry](sealskin-apps.md)| The YAML app manifests and autostart scripts that define the launchable catalog | Orchestration data |
53
-
|[Pelorus](pelorus.md)| Agentic interface: text based desktop state and a control API so LLMs can drive sessions| Agent layer |
51
+
|[Pelorus](pelorus.md)| Agentic interface built into Selkies: the desktop as text, actions on it, and a model that drives it| Agent layer |
54
52
55
53
## How a frame reaches your eyeball
56
54
57
55
To make the layering concrete, here is the life of one frame in a Wayland mode container:
58
56
59
-
1. The application renders into a buffer belonging to **labwc** (or KWin on KDE), which is itself a client of the headless Smithay compositor that **pixelflux** hosts in process. On X11 the application instead draws into an XLibre Xvfb whose screen pixmap lives on the GPU, and pixelflux blits it out through DRI3 rather than compositing it.
60
-
2. Pixelflux composites the output. If a GPU holds the framebuffer and the encoder lives on the same GPU, the frame is passed as a DMA-BUF straight into NVENC or VA-API, zero copy, for any codec the card carries. Otherwise it is read back and encoded on CPU, in parallel stripes for H.264 and JPEG and full frame for the other codecs.
61
-
3. Only regions that changed get encoded at all; a static screen costs almost nothing, and after motion stops a high quality paint over pass restores perfect detail.
62
-
4. The encoded frame, with a small binary header, is handed to**Selkies**, which broadcasts it over the WebSocket to every connected viewer with backpressure control per client.
63
-
5.The container's **Nginx** carries that WebSocket alongside the static web client, file downloads, basic auth, and the optional Pelorus API, all on one HTTPS port.
57
+
1. The application renders into a buffer that is a client surface of the headless Smithay compositor **pixelflux** hosts inside the Selkies process, placed and framed by the **Selkies window manager** (or into a nested KWin on KDE, itself a client of that compositor). On X11 the application instead draws into the bundle's XLibre Xvfb, whose screen pixmap lives on the GPU when one is mounted, and pixelflux blits it out through DRI3, or reads the shared framebuffer in place without one.
58
+
2. Pixelflux composites the output, or takes a window that covers the whole output as the frame directly. If a GPU holds the framebuffer and the encoder lives on the same GPU, the frame is passed as a DMA-BUF straight into NVENC or VA-API, zero copy, for any codec the card carries. Otherwise it is read back and encoded on CPU.
59
+
3. Only what changed gets encoded at all; a static screen costs almost nothing, still areas beside motion are refined, and after motion stops a high quality paint over pass restores perfect detail.
60
+
4. The encoded frame, with a small binary header, is broadcast by**Selkies** over the WebSocket to every connected viewer with backpressure control per client.
61
+
5.Selkies serves that WebSocket alongside the web client, file downloads, basic auth, and the optional Pelorus API, all on one HTTPS port.
64
62
6. In your browser, the **web client** decodes with WebCodecs and paints to a canvas, while sending your input, clipboard, mic, and gamepad state back up the same socket.
65
63
66
64
Everything above ships in one container image built on **docker-baseimage-selkies**, and **SealSkin** launches, secures, and reaps such containers on demand.
0 commit comments