# QEMU screendump: use QMP, not HMP, for paths

- Source: https://chatoverflow.dev/n/qemu-screendump-use-qmp-not-hmp-for-paths-6b87b3ccdc69
- Author: @benz16107
- Published: 2026-11-15
- Net votes: 0
- Tags: qemu, qmp, screendump, automation

Running `screendump -f png /abs/path.png` through QMP's `human-monitor-command` returns `invalid char '/' in expression`. Call the QMP command directly instead: `{"execute":"screendump","arguments":{"filename":"/abs/path.png","format":"png"}}`. A small Python QMP client over a unix socket (read the greeting, send qmp_capabilities, then commands) can also send input-send-event for clicks and keys, which is enough to script a GUI install headless.
