### Record Desktop Session with FFmpeg Source: https://github.com/linuxserver/docker-baseimage-selkies/blob/master/README.md Executes commands inside a running container to update apt packages and install FFmpeg. Then, uses FFmpeg to record the desktop session from a specified Unix socket. ```bash docker exec -it containername apt-get update && apt-get install -y ffmpeg ffmpeg -f h264 -i unix:///defaults/recording -c:v copy test.h264 ``` ```bash # Optional re-encode the stream to clean it up ffmpeg -f h264 -framerate 60 -i unix:///defaults/recording -c:v libx264 -preset fast -crf 23 -pix_fmt yuv420p test.mp4 ``` -------------------------------- ### Nvidia Host Setup: Unraid Syslinux Configuration Source: https://github.com/linuxserver/docker-baseimage-selkies/blob/master/README.md For Unraid systems using Syslinux, modify the syslinux.cfg file to include the necessary Nvidia kernel parameters. Append these parameters to the 'append' line of the Unraid OS boot entry. ```text nvidia-drm.modeset=1 nvidia_drm.fbdev=1 ``` -------------------------------- ### Nvidia Host Setup: Update GRUB Source: https://github.com/linuxserver/docker-baseimage-selkies/blob/master/README.md After modifying the GRUB configuration, run this command to apply the changes and update the bootloader. This ensures the new kernel parameters are active on the next boot. ```bash sudo update-grub ``` -------------------------------- ### Dockerfile for Application Container Source: https://github.com/linuxserver/docker-baseimage-selkies/blob/master/README.md A minimal Dockerfile to create an application container using the base image, installing an application, and copying configuration files. ```dockerfile FROM ghcr.io/linuxserver/baseimage-selkies:alpine322 RUN apk add --no-cache firefox COPY /root /root ``` -------------------------------- ### Nvidia Host Setup: Docker Runtime Configuration Source: https://github.com/linuxserver/docker-baseimage-selkies/blob/master/README.md Configure the Docker daemon on the host to use the Nvidia container runtime. This is essential for Docker to properly utilize Nvidia GPUs. Restart Docker after configuration. ```bash sudo nvidia-ctk runtime configure --runtime=docker sudo systemctl restart docker ``` -------------------------------- ### Setting a Range for Framerate Source: https://github.com/linuxserver/docker-baseimage-selkies/blob/master/README.md Use a hyphen-separated `min-max` format to define a range for a setting, which will be displayed as a UI slider. This example locks the framerate to exactly 60 FPS. ```bash -e SELKIES_FRAMERATE="60" ``` -------------------------------- ### Nvidia Host Setup: GRUB Configuration Source: https://github.com/linuxserver/docker-baseimage-selkies/blob/master/README.md Configure the GRUB bootloader on your Linux host to enable Nvidia kernel modules for Wayland support. This involves adding specific kernel parameters to the GRUB configuration file and updating GRUB. ```text GRUB_CMDLINE_LINUX_DEFAULT=" nvidia-drm.modeset=1 nvidia_drm.fbdev=1" ``` -------------------------------- ### Locking an Enum Setting Source: https://github.com/linuxserver/docker-baseimage-selkies/blob/master/README.md Provide a single value to lock an enum setting, making it the default and hiding the UI dropdown. This example forces the encoder to 'jpeg'. ```bash -e SELKIES_ENCODER="jpeg" ``` -------------------------------- ### Locking a Boolean Setting Source: https://github.com/linuxserver/docker-baseimage-selkies/blob/master/README.md Use `true|locked` to force a boolean setting and hide the UI toggle, preventing user changes. This example forces CPU encoding to be enabled. ```bash -e SELKIES_USE_CPU="true|locked" ``` -------------------------------- ### Docker Compose for Intel/AMD GPU Acceleration Source: https://github.com/linuxserver/docker-baseimage-selkies/blob/master/README.md Configure your docker-compose.yml to enable hardware acceleration for Intel/AMD GPUs in Wayland mode. This setup maps the DRI devices and sets environment variables for Wayland and GPU node selection. ```yaml devices: - /dev/dri:/dev/dri environment: - PIXELFLUX_WAYLAND=true # Optional: Specify device if multiple exist (IE: /dev/dri/renderD129) - DRINODE=/dev/dri/renderD128 - DRI_NODE=/dev/dri/renderD128 ``` -------------------------------- ### Define Application Autostart Source: https://github.com/linuxserver/docker-baseimage-selkies/blob/master/README.md Creates a directory and a file to specify the application that should autostart when the container launches. ```bash mkdir -p root/defaults echo "firefox" > root/defaults/autostart ``` -------------------------------- ### Custom startwm.sh for Full Desktop Environment Source: https://github.com/linuxserver/docker-baseimage-selkies/blob/master/README.md Indicates the location of the startwm.sh script within the defaults folder, which can be used to replace the default DE with a custom one. ```text ├── Dockerfile └── root └── defaults └── startwm.sh ``` -------------------------------- ### Clone and Run Selkies Development Environment Source: https://github.com/linuxserver/docker-baseimage-selkies/blob/master/README.md Clone the Selkies repository and run the webtop container in development mode. Mounts the current directory to /config/src for live code changes. ```bash git clone https://github.com/selkies-project/selkies.git cd selkies git checkout -f lsio docker run --rm -it \ --shm-size=1gb \ -e DEV_MODE=selkies-dashboard \ -e PUID=1000 \ -e PGID=1000 \ -v $(pwd):/config/src \ -p 3001:3001 ghcr.io/linuxserver/webtop:ubuntu-kde bash ``` -------------------------------- ### Clone and Run Pixelflux Development Environment Source: https://github.com/linuxserver/docker-baseimage-selkies/blob/master/README.md Clone the Pixelflux repository and run the webtop container in development mode. Mounts the current directory to /config/src for live code changes. ```bash git clone https://github.com/linuxserver/pixelflux.git cd pixelflux docker run --rm -it \ --shm-size=1gb \ -e DEV_MODE=pixelflux \ -e PUID=1000 \ -e PGID=1000 \ -v $(pwd):/config/src \ -p 3001:3001 ghcr.io/linuxserver/webtop:ubuntu-kde bash ``` -------------------------------- ### Build and Run Application Container Source: https://github.com/linuxserver/docker-baseimage-selkies/blob/master/README.md Commands to build the Docker image for the application container and run it, exposing the application on port 3001. ```bash docker build -t firefox . docker run --rm -it -p 3001:3001 firefox bash ``` -------------------------------- ### Structure for Menu Definition Source: https://github.com/linuxserver/docker-baseimage-selkies/blob/master/README.md Illustrates the directory structure required to include the menu definition file within the Docker build context. ```text ├── Dockerfile └── root └── defaults └── autostart └── menu.xml ``` -------------------------------- ### Set Desktop Session Language Source: https://github.com/linuxserver/docker-baseimage-selkies/blob/master/README.md Set the LC_ALL environment variable to launch the Desktop session in a different language. Ensure the locale is available on the system. ```bash docker run -d -e LC_ALL=fr_FR.UTF-8 \n --name=selkies \n linuxserver/baseimage-selkies:latest ``` -------------------------------- ### Docker Run for Intel/AMD GPU Acceleration Source: https://github.com/linuxserver/docker-baseimage-selkies/blob/master/README.md Use this command to run a container with hardware acceleration for Intel/AMD GPUs in Wayland mode. It configures shared memory, maps the host's DRI devices, and enables Wayland and automatic GPU detection. ```bash docker run --rm -it \ --shm-size=1gb \ -p 3001:3001 \ --device /dev/dri \ -e PIXELFLUX_WAYLAND=true \ -e AUTO_GPU=true \ lsiobase/selkies:debiantrixie bash ``` -------------------------------- ### Docker Run for Nvidia GPU Acceleration Source: https://github.com/linuxserver/docker-baseimage-selkies/blob/master/README.md Execute this command to run a container with hardware acceleration for Nvidia GPUs in Wayland mode. It utilizes the Nvidia runtime, maps all GPUs, and enables Wayland and automatic GPU detection. ```bash docker run --rm -it \ --shm-size=1gb \ -p 3001:3001 \ --runtime nvidia \ --gpus all \ -e PIXELFLUX_WAYLAND=true \ -e AUTO_GPU=true \ lsiobase/selkies:debiantrixie bash ``` -------------------------------- ### Docker Compose for Nvidia GPU Acceleration Source: https://github.com/linuxserver/docker-baseimage-selkies/blob/master/README.md Set up your docker-compose.yml for Nvidia GPU acceleration in Wayland mode. This configuration includes environment variables for Wayland and GPU nodes, and specifies Nvidia device reservations for the deployment. ```yaml environment: - PIXELFLUX_WAYLAND=true # Ensure these point to the rendered node injected by the runtime (usually renderD128) - DRINODE=/dev/dri/renderD128 - DRI_NODE=/dev/dri/renderD128 deploy: resources: reservations: devices: - driver: nvidia count: 1 capabilities: [compute,video,graphics,utility] ``` -------------------------------- ### POST /tokens - Manage Access Tokens Source: https://github.com/linuxserver/docker-baseimage-selkies/blob/master/README.md This endpoint allows for the dynamic setting and updating of access tokens used by clients. It replaces the entire set of active tokens with the provided payload. ```APIDOC ## POST /tokens ### Description This endpoint allows for the dynamic setting and updating of access tokens used by clients. It replaces the entire set of active tokens with the provided payload. ### Method POST ### Endpoint http://localhost:8083/tokens ### Parameters #### Path Parameters None #### Query Parameters None #### Request Body - **(Object, required)** A JSON object where each key is a unique access token string and the value is a permissions object. - **Permissions Object Fields:** - **role** (String, required) - Can be `"controller"` (full access) or `"viewer"` (restricted access). - **slot** (Integer or `null`, required) - Assigns an input slot (1-4) or `null` for no specific slot. - **mk_control** (Boolean, optional) - Exclusive override for Mouse & Keyboard input. If `true` on any token, only that client processes mouse and keyboard events. Defaults to clients with `"controller"` role if `false` or omitted on all tokens. ### Request Example ```bash curl -X POST http://localhost:8083/tokens \ -H "Authorization: Bearer my-secret-master-token" \ -H "Content-Type: application/json" \ -d '{ "token-1": {"role": "controller", "slot": null, "mk_control": false}, "token-2": {"role": "viewer", "slot": 1, "mk_control": true} }' ``` ### Response #### Success Response (200) Replaces the entire set of active tokens with the new set provided in the payload. Clients with tokens not present in the new set are disconnected. Clients with tokens that remain valid but have changed permissions receive an immediate state update. #### Response Example None explicitly documented. ``` -------------------------------- ### Openbox Menu Definition for Applications Source: https://github.com/linuxserver/docker-baseimage-selkies/blob/master/README.md An XML file defining a menu for the Openbox window manager, allowing users to launch applications like xterm and Firefox by right-clicking the desktop. ```xml /usr/bin/xterm /usr/bin/firefox ``` -------------------------------- ### Manage Access Tokens via Control Plane API Source: https://github.com/linuxserver/docker-baseimage-selkies/blob/master/README.md Use curl to send a POST request to the control plane API to manage access tokens. The request must include an Authorization header with the master token and a JSON payload defining the tokens and their permissions. This API should not be exposed publicly. ```bash curl -X POST http://localhost:8083/tokens \ -H "Authorization: Bearer my-secret-master-token" \ -H "Content-Type: application/json" \ -d '{ "token-1": {"role": "controller", "slot": null, "mk_control": false}, "token-2": {"role": "viewer", "slot": 1, "mk_control": true} }' ``` === COMPLETE CONTENT === This response contains all available snippets from this library. No additional content exists. Do not make further requests.