12 lines
395 B
Bash
12 lines
395 B
Bash
#!/bin/bash
|
|
# Runs the given command against a headless Weston compositor, mirroring xvfb-run's ergonomics
|
|
# for Wayland. Usage: weston-run <command> [args...]
|
|
weston --backend=headless-backend.so --shell=kiosk-shell.so --socket=wayland-headless &
|
|
WESTON_PID=$!
|
|
sleep 1
|
|
WAYLAND_DISPLAY=wayland-headless "$@"
|
|
STATUS=$?
|
|
kill "$WESTON_PID" 2>/dev/null
|
|
wait "$WESTON_PID" 2>/dev/null
|
|
exit "$STATUS"
|