mirror of
https://github.com/saphid/frame-control.git
synced 2026-10-06 02:00:19 +02:00
Verify against a real Frame; switch clipboard to Klipper
The headset desktop is nested Plasma in gamescope with no wl-copy/xclip, so paste-to-frame.sh now calls Klipper over plasmashell's D-Bus bus. connect.sh, push.sh, paste-to-frame.sh and install-apps.sh were exercised on SteamOS 0.3.0 (build 20260922); docs record what was confirmed. Cross-provider review skipped at Alex's request (Astra quota exhausted). Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
This commit is contained in:
1 parent
1f6115b789
commit
a7ae41b94f
8 files changed
+78
-48
No files matched your search
+1
-1
@@ -2,7 +2,7 @@
|
||||
# Mac-side: find the Steam Frame, create a key, add a `Host frame` alias to
|
||||
# ~/.ssh/config, copy the key, and optionally disable SSH password logins.
|
||||
#
|
||||
# UNTESTED against real hardware. Idempotent: safe to re-run.
|
||||
# Verified on a Frame 2026-09-25 (except --harden). Idempotent: safe to re-run.
|
||||
#
|
||||
# Usage:
|
||||
# scripts/connect.sh [HOST_OR_IP] # set up key + alias
|
||||
|
||||
@@ -2,7 +2,9 @@
|
||||
# Mac-side: install Flatpaks on the Steam Frame over SSH (per-user, so they
|
||||
# survive SteamOS updates and need no sudo / steamos-readonly changes).
|
||||
#
|
||||
# UNTESTED against real hardware. Idempotent.
|
||||
# Verified on a Frame 2026-09-25 (remmina + --vnc-host). Idempotent.
|
||||
# The "exports/share is not in the search path" warning only applies to the
|
||||
# SSH shell; the headset desktop's XDG_DATA_DIRS already includes it.
|
||||
#
|
||||
# Usage:
|
||||
# scripts/install-apps.sh remmina [--vnc-host my-mac.local]
|
||||
|
||||
+19
-20
@@ -1,8 +1,8 @@
|
||||
#!/usr/bin/env zsh
|
||||
# Mac-side: put text on the Steam Frame desktop clipboard.
|
||||
#
|
||||
# UNTESTED against real hardware. Assumes the in-headset desktop is a Plasma
|
||||
# session owned by the SSH user; prints diagnostics if that assumption fails.
|
||||
# Needs the headset's desktop (Plasma) to be running. Text only; very large
|
||||
# pastes (over ~100 KB) exceed the argument limit, so use push.sh for those.
|
||||
#
|
||||
# Usage:
|
||||
# scripts/paste-to-frame.sh # sends the Mac clipboard (pbpaste)
|
||||
@@ -11,28 +11,27 @@ set -euo pipefail
|
||||
|
||||
FRAME_ALIAS=${FRAME_ALIAS:-frame}
|
||||
|
||||
# Runs on the Frame. Clipboard text arrives on stdin. setsid keeps the
|
||||
# clipboard-serving process alive after the SSH session closes.
|
||||
# Runs on the Frame. Clipboard text arrives on stdin.
|
||||
# Verified 2026-09-25 (SteamOS 0.3.0 vr, build 20260922): the headset desktop is
|
||||
# a nested Plasma Wayland session inside gamescope with its own D-Bus bus, and
|
||||
# wl-copy/xclip are not installed. Klipper (org.kde.klipper, served by
|
||||
# plasmashell) is reachable with qdbus6, so we borrow plasmashell's bus address.
|
||||
remote=$(cat <<'EOF'
|
||||
set -u
|
||||
tmp=$(mktemp)
|
||||
cat > "$tmp"
|
||||
rt=/run/user/$(id -u)
|
||||
sock=$(ls "$rt" 2>/dev/null | grep -E '^wayland-[0-9]+$' | head -n 1)
|
||||
if [ -n "$sock" ] && command -v wl-copy >/dev/null 2>&1 \
|
||||
&& XDG_RUNTIME_DIR=$rt WAYLAND_DISPLAY=$sock setsid wl-copy < "$tmp" >/dev/null 2>&1; then
|
||||
echo "copied via wl-copy ($sock)"
|
||||
elif command -v xclip >/dev/null 2>&1 \
|
||||
&& DISPLAY=:0 setsid xclip -selection clipboard -i < "$tmp" >/dev/null 2>&1; then
|
||||
echo "copied via xclip (DISPLAY=:0)"
|
||||
text=$(cat; printf x); text=${text%x}
|
||||
pid=$(pgrep -u "$(id -u)" -x plasmashell | head -n 1)
|
||||
if [ -z "$pid" ]; then
|
||||
echo "plasmashell is not running: open the desktop in the headset first." >&2
|
||||
exit 2
|
||||
fi
|
||||
bus=$(tr '\0' '\n' < "/proc/$pid/environ" | sed -n 's/^DBUS_SESSION_BUS_ADDRESS=//p')
|
||||
if DBUS_SESSION_BUS_ADDRESS=$bus qdbus6 org.kde.klipper /klipper \
|
||||
org.kde.klipper.klipper.setClipboardContents "$text" >/dev/null; then
|
||||
echo "copied via Klipper (${#text} chars)"
|
||||
else
|
||||
echo "clipboard copy failed; diagnostics:" >&2
|
||||
echo " runtime dir: $(ls "$rt" 2>&1 | tr '\n' ' ')" >&2
|
||||
echo " wl-copy: $(command -v wl-copy || echo missing) xclip: $(command -v xclip || echo missing)" >&2
|
||||
loginctl list-sessions --no-legend 2>&1 | sed 's/^/ session: /' >&2
|
||||
rm -f "$tmp"; exit 2
|
||||
echo "Klipper call failed (bus: ${bus:-none})" >&2
|
||||
exit 2
|
||||
fi
|
||||
rm -f "$tmp"
|
||||
EOF
|
||||
)
|
||||
b64=$(print -rn -- "$remote" | base64)
|
||||
|
||||
+1
-1
@@ -1,7 +1,7 @@
|
||||
#!/usr/bin/env zsh
|
||||
# Mac-side: copy a file or folder to the Steam Frame.
|
||||
#
|
||||
# UNTESTED against real hardware.
|
||||
# Verified on a Frame 2026-09-25.
|
||||
#
|
||||
# Usage: scripts/push.sh SOURCE [REMOTE_DEST] (default dest: ~/Downloads/)
|
||||
set -euo pipefail
|
||||
|
||||
Reference in new issue
Block a user