Add chandra-remote: VNC and web control over Tailscale
CI / test (push) Failing after 50s

- remote/: shared-memory framebuffer mirror served as RFB 3.8 (VNC, port 5900) and an HTTP/WebSocket PWA (port 6080), bound to the Tailscale interface and loopback by default
- Compositor: remote pointer, button, scroll, modifier, key, key-tap, text and clipboard input, routed past OLED blanking
- chandra-ctl: add status, refresh and osk commands; add input-* and clipboard-set for remote control
- Camera: debayer 10-bit CSI-2 Quad-Bayer frames for imx371 and high-quality still capture
- Camera: rotate frames by the libcamera mounting angle (CCW for 90), fix the expected test values, and restyle the UI for a dark theme
This commit is contained in:
nandi committed 2026-11-28 17:57:55 -08:00
1 parent de39b74282
commit bfc60ee0e5
24 files changed
+5310 -79

No files matched your search

+4 -1
View File
@@ -13,6 +13,9 @@
chandra-ctl rotate [ARG] rotate/flip display (cw, ccw, flip, 0, 90, 180, 270, status)
chandra-ctl screen [ARG] turn display off/on (on, off, toggle, status)
chandra-ctl brightness [ARG] get/set backlight brightness percent (5..100, status)
chandra-ctl osk [ARG] enable/disable/query on-screen keyboard (on, off, toggle, status)
chandra-ctl status report display size, rotation, screen power, brightness, pointer, OSK
chandra-ctl refresh schedule a full frame redraw
chandra-ctl settings [TAB] open Settings popup tab (session, desktop, panel, power, shortcuts, apps)
chandra-ctl auth-demo [MODE] show the password dialog with a pretend check (password "demo");
MODE: password, face, face-ok, die, slow, users (docs/auth-dialog.md)
@@ -29,7 +32,7 @@ import os
import socket
import sys
USAGE = "usage: chandra-ctl [--socket PATH] [--quiet] {reload [NAME] | list | ping | shortcut ID | kiosk [lock|unlock|status] | launch ID | windows | screenshot [PATH] | rotate [ARG] | screen [ARG] | brightness [ARG] | settings [TAB] | auth-demo [MODE] | auth-status | help}"
USAGE = "usage: chandra-ctl [--socket PATH] [--quiet] {reload [NAME] | list | ping | shortcut ID | kiosk [lock|unlock|status] | launch ID | windows | screenshot [PATH] | rotate [ARG] | screen [ARG] | brightness [ARG] | osk [ARG] | status | refresh | settings [TAB] | auth-demo [MODE] | auth-status | help}"
def runtime_dir():
+8
View File
@@ -247,5 +247,13 @@ if [ "$backend" = --drm ] && [ "${CHANDRA_AUTO_ROTATE:-1}" != "0" ] &&
/usr/local/bin/chandra-auto-rotate --parent-pid "$$" >>"$log" 2>&1 &
fi
remote_cfg="${XDG_CONFIG_HOME:-$HOME/.config}/chandra/remote.conf"
if [ "${CHANDRA_REMOTE:-auto}" != "0" ] && [ -x /usr/local/bin/chandra-remote ]; then
if [ "${CHANDRA_REMOTE:-auto}" = "1" ] || grep -Eq '^[[:space:]]*enabled[[:space:]]*=[[:space:]]*1' "$remote_cfg" 2>/dev/null; then
WAYLAND_DISPLAY="$(basename "$sock")" \
/usr/local/bin/chandra-remote --parent-pid "$$" >>"$log" 2>&1 &
fi
fi
exec "$@" $backend --socket "$sock" \
--theme "$share/config/themes/moon-night.json" >>"$log" 2>&1
+26
View File
@@ -35,6 +35,8 @@ Installs:
/usr/local/lib/chandra/chandra-camera-ui Native GTK3/Cairo Camera UI binary
/usr/share/applications/chandra-camera.desktop Camera app desktop entry
/usr/share/icons/hicolor/scalable/apps/chandra-camera.svg Camera app icon
/usr/local/bin/chandra-remote Tailscale-first VNC & Mobile Web UI remote daemon
/usr/local/share/chandra/remote/ Remote Web UI / PWA assets
/usr/local/share/color-schemes/Chandra{Dark,Light}.colors KDE color schemes, used when Breeze's
aren't installed
/usr/local/share/chandra/{config,wit,assets}/ files the compositor reads at runtime
@@ -75,6 +77,7 @@ targets = [
"/usr/local/lib/chandra/chandra-camera-ui",
"/usr/share/applications/chandra-camera.desktop",
"/usr/share/icons/hicolor/scalable/apps/chandra-camera.svg",
"/usr/local/bin/chandra-remote",
"/usr/local/share/color-schemes/ChandraDark.colors",
"/usr/local/share/color-schemes/ChandraLight.colors",
"/usr/share/wayland-sessions/chandra.desktop",
@@ -199,6 +202,29 @@ os.replace(cam_ui_dst + ".new", cam_ui_dst)
print("installed", cam_ui_dst)
put(os.path.join(root, "camera/chandra-camera.desktop"), "/usr/share/applications/chandra-camera.desktop", 0o644)
put(os.path.join(root, "camera/chandra-camera.svg"), "/usr/share/icons/hicolor/scalable/apps/chandra-camera.svg", 0o644)
remote_srcs = [
os.path.join(root, "remote", f)
for f in ("chandra-remote.c", "rfb.c", "web.c", "keysym.c", "auth.c")
]
remote_dst = "/usr/local/bin/chandra-remote"
remote_flags = subprocess.check_output(
["pkg-config", "--cflags", "--libs", "libturbojpeg", "zlib", "libcrypto"],
text=True,
).split()
subprocess.check_call(
[cc, "-O2", "-Wall", "-Wextra", "-o", remote_dst + ".new"]
+ remote_srcs
+ remote_flags
+ ["-lpthread"]
)
os.chmod(remote_dst + ".new", 0o755)
os.replace(remote_dst + ".new", remote_dst)
print("installed", remote_dst)
remote_web_dst = os.path.join(share, "remote")
os.makedirs(remote_web_dst, exist_ok=True)
os.chmod(remote_web_dst, 0o755)
for wf in ("index.html", "manifest.json", "icon.svg"):
put(os.path.join(root, "remote/web", wf), os.path.join(remote_web_dst, wf), 0o644)
if shutil.which("gtk-update-icon-cache"):
subprocess.run(["gtk-update-icon-cache", "-q", "-f", "/usr/share/icons/hicolor"], check=False)
for f in ("ChandraDark.colors", "ChandraLight.colors"):