From 471332e20fde1d3bd9f86fa6e35af5a5a66db0e8 Mon Sep 17 00:00:00 2001 From: rickpeters Date: Sun, 27 Sep 2026 20:01:41 +0200 Subject: [PATCH] docs: steam-machine-iso: live-session quirks; scripts/qmptype.py types into the VM --- .claude/skills/steam-machine-iso/SKILL.md | 13 +++++++++++++ scripts/qmptype.py | 22 ++++++++++++++++++++++ 2 files changed, 35 insertions(+) create mode 100644 scripts/qmptype.py diff --git a/.claude/skills/steam-machine-iso/SKILL.md b/.claude/skills/steam-machine-iso/SKILL.md index c46254a..f24fe9f 100644 --- a/.claude/skills/steam-machine-iso/SKILL.md +++ b/.claude/skills/steam-machine-iso/SKILL.md @@ -125,3 +125,16 @@ unit), through Calamares, then check kernel may fail even when DKMS built for the installed kernels. Real hardware (Steam Machine, USB stick) is the final test: gamescope, LEDs, CEC, power-off. + +## Live-session quirks + +- Copy/paste doesn't reach QEMU over Moonlight: type commands with + `python3 scripts/qmptype.py /qmp.sock ""` (US layout, adds + Enter; the VM window's terminal must have focus). QMP `screendump` gives "no + surface" with virgl: screenshot the Steam Machine's desktop instead + (`spectacle -b -n -f -o /tmp/host.png` in its session). +- CachyOS Hello refuses to start the installer on a self-built ISO ("testing + ISO"): run `calamares-online.sh` in Konsole. +- `cachyos-calamares-next 3.4.2-13` needs `libboost_*.so.1.91.0` while the + repos ship Boost 1.92: steamify-prepare.sh puts 1.91's libraries on the ISO + (from archive.archlinux.org) until CachyOS rebuilds it. diff --git a/scripts/qmptype.py b/scripts/qmptype.py new file mode 100644 index 0000000..5af3865 --- /dev/null +++ b/scripts/qmptype.py @@ -0,0 +1,22 @@ +# qmptype.py : types (US layout) into the VM, then Enter. +import socket, json, sys, time +sock, text = sys.argv[1], sys.argv[2] +s = socket.socket(socket.AF_UNIX); s.connect(sock); f = s.makefile("rw"); f.readline() +def cmd(c): + f.write(json.dumps(c) + "\n"); f.flush(); return f.readline() +cmd({"execute": "qmp_capabilities"}) +plain = {" ": "spc", "/": "slash", ".": "dot", "-": "minus", "'": "apostrophe", "\n": "ret", + "=": "equal", ",": "comma", ";": "semicolon", "\\": "backslash", "[": "bracket_left", "]": "bracket_right"} +shifted = {"&": "7", "*": "8", "_": "minus", ":": "semicolon", "|": "backslash", "~": "grave_accent", + "!": "1", "@": "2", "#": "3", "$": "4", "%": "5", "^": "6", "(": "9", ")": "0", "+": "equal", '"': "apostrophe"} +for ch in text + "\n": + keys = [] + if ch.isalpha(): + if ch.isupper(): keys.append("shift") + keys.append(ch.lower()) + elif ch.isdigit(): keys.append(ch) + elif ch in plain: keys.append(plain[ch]) + elif ch in shifted: keys += ["shift", shifted[ch]] + else: raise SystemExit("no key for %r" % ch) + cmd({"execute": "send-key", "arguments": {"keys": [{"type": "qcode", "data": k} for k in keys]}}) + time.sleep(0.03)