From 94338ee7988cc0f790c015dc336e40c5c09a3bad Mon Sep 17 00:00:00 2001 From: Christian Hergert Date: Fri, 17 Feb 2023 09:12:42 -0800 Subject: [PATCH] README.md: Add example to test --- README.md | 29 +++++++++++++++++++++++++++++ 1 file changed, 29 insertions(+) diff --git a/README.md b/README.md index 5631c1e..516257c 100644 --- a/README.md +++ b/README.md @@ -3,3 +3,32 @@ This library provides a "Mouse, Keyboard, and Screen" to Qemu using the D-Bus device support in Qemu and GTK 4. +# Testing + +By default, Qemu will connect to your user session D-Bus if you do not +provide an address for `-display dbus`. Therefore, it is pretty easy to +test things by running Qemu manually and then connecting with the test +program `./tools/mks`. + +```sh +qemu-img create -f qcow2 fedora.img 30G +qemu-system-x86_64 \ + -enable-kvm \ + -cpu host + -device virtio-vga-gl,xres=1920,yres=1080 \ + -m 8G \ + -smp 4 \ + -display dbus,gl=on \ + -cdrom Fedora-Workstation.iso \ + -hda fedora.img \ + -boot d +``` + +and then to run the test widget + +```sh +meson setup build +cd build +ninja +./tools/mks +```