Let the headset sleep with the helper idle; keep the container out of our units

With the pointer released, the helper still listed overlays by running
vrcmd every second, a new SteamVR client each time, which kept SteamVR
from going to standby. The list now pauses while the pointer is off.

Starting the dev container from one of our services made that service own
it, so stopping the service stopped the container and the desktop's
compositor with it. scripts/container-up.sh starts the container in a
systemd scope of its own before every distrobox enter.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
DeeJanuzandClaude Opus 5.5 committed 2026-09-26 17:56:45 -06:00
1 parent 938dabe9c4
commit 4d845492e7
9 files changed
+40 -4

No files matched your search

+12
View File
@@ -0,0 +1,12 @@
#!/bin/bash
# Runs on the Frame host. Starts the dev container, if it isn't running, in a systemd scope
# of its own. Whoever starts a podman container owns its monitor (conmon): started from one
# of our services (distrobox enter starts it on demand), the container, and everything in it
# like the desktop's compositor, would be killed when that service stops. Call this before
# `distrobox enter`.
box=${FRAME_BOX:-dev}
export XDG_RUNTIME_DIR=${XDG_RUNTIME_DIR:-/run/user/$(id -u)}
[ "$(podman container inspect -f '{{.State.Running}}' "$box" 2>/dev/null)" = true ] && exit 0
podman container exists "$box" 2>/dev/null || exit 0 # not created yet: setup/dev-container.sh does that
exec systemd-run --user --scope --quiet --collect --description="$box container (started for Frametop)" \
podman start "$box" >/dev/null
+2 -1
View File
@@ -30,6 +30,7 @@ if [ "$FRAME_LOCAL" = 1 ]; then
if [ "$on_host" = 1 ]; then
exec bash -c "$*"
fi
"$REPO_ROOT/scripts/container-up.sh" # in a scope of its own, not this shell's session
exec "$HOME/.local/bin/distrobox" enter "$FRAME_BOX" -- bash -lc "$*"
fi
@@ -39,5 +40,5 @@ if [ "$on_host" = 1 ]; then
exec ssh "${tty[@]}" "$FRAME_HOST" "cd $(printf %q "$dir") && $*"
else
exec ssh "${tty[@]}" "$FRAME_HOST" \
"cd $(printf %q "$dir") && ~/.local/bin/distrobox enter $(printf %q "$FRAME_BOX") -- bash -lc $(printf %q "$*")"
"$(printf %q "$FRAME_REPO")/scripts/container-up.sh; cd $(printf %q "$dir") && ~/.local/bin/distrobox enter $(printf %q "$FRAME_BOX") -- bash -lc $(printf %q "$*")"
fi