Full project rename, decided 2026-06-10: - Crates/binaries: punktfunk-core / punktfunk-host / punktfunk-client-rs. - C ABI: punktfunk_* symbols, Punktfunk* types, include/punktfunk_core.h, PUNKTFUNK_FEATURE_QUIC guard (header regenerated; cbindgen renames updated, incl. PUNKTFUNK_BTN_*/PUNKTFUNK_AXIS_* wire constants). - Protocol: punktfunk/1 — control-plane magic LMN1 → PKF1, nonce salt lmn1 → pkf1. WIRE BREAK: clients must be rebuilt from this revision. - Env knobs: PUNKTFUNK_VIDEO_SOURCE / PUNKTFUNK_COMPOSITOR / PUNKTFUNK_ZEROCOPY / …. - Host config dir: ~/.config/punktfunk (the box's dir was migrated in place — the persistent identity is unchanged, pinned fingerprints stay valid). - Swift package: PunktfunkKit + PunktfunkCore.xcframework + PunktfunkConnection (Sources/PunktfunkClient app + tests renamed with it); build-xcframework.sh updated. - scripts/: 60-punktfunk.rules, punktfunk-host.service; OpenAPI doc regenerated. Also: scripts/headless/run-headless-kde.sh — full headless Plasma bringup. Root cause of "desktop but no apps/settings" over the stream: plasmashell launched without XDG_MENU_PREFIX=plasma-, so the launcher resolved a nonexistent applications.menu and rendered an empty menu. The script sets the complete KDE session env (menu prefix, KDE_FULL_SESSION, session version) and rebuilds ksycoca before starting plasmashell. Gate: 97/97 tests, clippy -D warnings (both feature sets), fmt, C-ABI harness PASS, zero lumen references left outside .git. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
This commit is contained in:
@@ -7,7 +7,7 @@
|
||||
# Ctrl-C to stop; then play/inspect the file (e.g. ffprobe out.mkv).
|
||||
set -euo pipefail
|
||||
|
||||
OUT="${1:-/tmp/lumen-headless-test.mkv}"
|
||||
OUT="${1:-/tmp/punktfunk-headless-test.mkv}"
|
||||
: "${WAYLAND_DISPLAY:?set WAYLAND_DISPLAY (e.g. wayland-1) — is headless Sway running?}"
|
||||
: "${XDG_RUNTIME_DIR:?set XDG_RUNTIME_DIR=/run/user/\$(id -u)}"
|
||||
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
# shellcheck shell=bash
|
||||
# Source before launching headless Sway / the lumen host on an NVIDIA VM:
|
||||
# Source before launching headless Sway / the punktfunk host on an NVIDIA VM:
|
||||
# source scripts/headless/env.sh
|
||||
# These are the wlroots-on-NVIDIA workarounds the research turned up (gles2 is the
|
||||
# known-good renderer; Vulkan is flaky on the proprietary driver — try it only later).
|
||||
|
||||
@@ -2,8 +2,8 @@
|
||||
# Run AFTER headless Sway is up (run-headless-sway.sh), from a second shell on the same
|
||||
# user. It: (1) points this shell at the running Sway, (2) gives HEADLESS-1 a real refresh
|
||||
# clock (an idle/0 mHz output produces no frames), (3) imports the env the ScreenCast portal
|
||||
# needs to find Sway and pick the wlr backend, and (4) writes /tmp/lumen-sway-env.sh so
|
||||
# other shells (e.g. `cargo run -p lumen-host`) can `source` it.
|
||||
# needs to find Sway and pick the wlr backend, and (4) writes /tmp/punktfunk-sway-env.sh so
|
||||
# other shells (e.g. `cargo run -p punktfunk-host`) can `source` it.
|
||||
#
|
||||
# Usage: bash scripts/headless/prepare-session.sh [WxH@RHz] (default 1920x1080@60Hz)
|
||||
set -euo pipefail
|
||||
@@ -32,7 +32,7 @@ echo "HEADLESS-1 set to $MODE"
|
||||
systemctl --user import-environment WAYLAND_DISPLAY XDG_CURRENT_DESKTOP SWAYSOCK XDG_RUNTIME_DIR 2>/dev/null || true
|
||||
dbus-update-activation-environment --systemd WAYLAND_DISPLAY XDG_CURRENT_DESKTOP SWAYSOCK 2>/dev/null || true
|
||||
|
||||
cat > /tmp/lumen-sway-env.sh <<EOF
|
||||
cat > /tmp/punktfunk-sway-env.sh <<EOF
|
||||
export XDG_RUNTIME_DIR=$XDG_RUNTIME_DIR
|
||||
export WAYLAND_DISPLAY=$WAYLAND_DISPLAY
|
||||
export XDG_CURRENT_DESKTOP=sway
|
||||
@@ -42,8 +42,8 @@ EOF
|
||||
|
||||
cat <<EOF
|
||||
session ready. From any shell on this user:
|
||||
source /tmp/lumen-sway-env.sh
|
||||
source /tmp/punktfunk-sway-env.sh
|
||||
swaymsg exec foot # optional: animated on-screen content
|
||||
cargo run -p lumen-host -- m0 --source portal --seconds 5 --out /tmp/lumen-m0.h265
|
||||
ffprobe /tmp/lumen-m0.h265
|
||||
cargo run -p punktfunk-host -- m0 --source portal --seconds 5 --out /tmp/punktfunk-m0.h265
|
||||
ffprobe /tmp/punktfunk-m0.h265
|
||||
EOF
|
||||
|
||||
Executable
+41
@@ -0,0 +1,41 @@
|
||||
#!/usr/bin/env bash
|
||||
# Headless KDE Plasma session for the punktfunk host (no KMS scanout → kwin --virtual).
|
||||
#
|
||||
# Brings up the full desktop, not just the compositor. The env matters: without
|
||||
# XDG_MENU_PREFIX=plasma- the launcher resolves ${XDG_MENU_PREFIX}applications.menu →
|
||||
# "applications.menu", which doesn't exist on KDE installs (it ships
|
||||
# plasma-applications.menu) — plasmashell runs fine but the menu shows NO applications
|
||||
# and no System Settings entry. kded6/krunner/kglobalacceld are D-Bus-activated once
|
||||
# plasmashell starts in the right session env.
|
||||
#
|
||||
# bash scripts/headless/run-headless-kde.sh [WxH] # default 1920x1080
|
||||
#
|
||||
# Then in another shell:
|
||||
# WAYLAND_DISPLAY=wayland-kde XDG_CURRENT_DESKTOP=KDE PUNKTFUNK_ZEROCOPY=1 \
|
||||
# punktfunk-host m3-host --source virtual --seconds 14400
|
||||
set -euo pipefail
|
||||
|
||||
RES="${1:-1920x1080}"
|
||||
W="${RES%x*}"
|
||||
H="${RES#*x}"
|
||||
|
||||
export XDG_RUNTIME_DIR="${XDG_RUNTIME_DIR:-/run/user/$(id -u)}"
|
||||
export DBUS_SESSION_BUS_ADDRESS="${DBUS_SESSION_BUS_ADDRESS:-unix:path=$XDG_RUNTIME_DIR/bus}"
|
||||
export XDG_CURRENT_DESKTOP=KDE
|
||||
export XDG_MENU_PREFIX=plasma-
|
||||
export KDE_FULL_SESSION=true
|
||||
export KDE_SESSION_VERSION=6
|
||||
export DESKTOP_SESSION=plasma
|
||||
export WAYLAND_DISPLAY=wayland-kde
|
||||
export KWIN_WAYLAND_NO_PERMISSION_CHECKS=1
|
||||
|
||||
kwin_wayland --virtual --width "$W" --height "$H" --no-lockscreen \
|
||||
--socket "$WAYLAND_DISPLAY" &
|
||||
KWIN_PID=$!
|
||||
sleep 2
|
||||
|
||||
kbuildsycoca6 >/dev/null 2>&1 || true # rebuild the menu cache under the correct env
|
||||
plasmashell &
|
||||
|
||||
echo "headless KDE up on $WAYLAND_DISPLAY ($RES), kwin pid $KWIN_PID"
|
||||
wait "$KWIN_PID"
|
||||
@@ -1,8 +1,8 @@
|
||||
#!/usr/bin/env bash
|
||||
# Launch headless Sway on the NVIDIA box for the lumen M0 capture spike.
|
||||
# Launch headless Sway on the NVIDIA box for the punktfunk M0 capture spike.
|
||||
#
|
||||
# Runs on the user's *shared* session bus (NOT a private dbus-run-session) so that the
|
||||
# ScreenCast portal (xdg-desktop-portal-wlr) and the lumen host share one bus. After this
|
||||
# ScreenCast portal (xdg-desktop-portal-wlr) and the punktfunk host share one bus. After this
|
||||
# is up, run `prepare-session.sh` from a second shell to set the mode + portal env.
|
||||
#
|
||||
# Prereqs (see docs/linux-setup.md / scripts/bootstrap-ubuntu.sh):
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
# Minimal headless Sway config for the lumen M0 capture spike.
|
||||
# Minimal headless Sway config for the punktfunk M0 capture spike.
|
||||
# Under WLR_BACKENDS=headless, Sway 1.9 auto-creates one output named HEADLESS-1
|
||||
# (fixed 1920x1080); this just resizes it. For extra outputs: `swaymsg create_output`
|
||||
# (auto-named HEADLESS-2, ...). Set the resolution to your target client size.
|
||||
|
||||
Reference in New Issue
Block a user