I use QEMU VMs. QEMU is not compliant with wayland then I use “GDK_BACKEND=x11”.
Here is the script to launch a QEMU VM and to minimize it in the kde systray with kdocker.
#!/bin/bash
bash -c '
GDK_BACKEND=x11 qemu-kvm -enable-kvm
-m 4G -smp 4 -cpu host
-display gtk,gl=on,zoom-to-fit=off
-device virtio-vga-gl
-device qemu-xhci,p2=5,p3=5,id=xhci
-device usb-kbd
-device usb-mouse
-device intel-hda
-device hda-duplex,audiodev=snd0
-audiodev pipewire,id=snd0
-device usb-host,vendorid=0x046d,productid=0x0825
-device usb-host,vendorid=0x0b05,productid=0x190e
-boot menu=on
-nic bridge,mac=00:16:3e:76:a3:e4
~/QEMU_VM/android_x86_64_8.1-r6.img
' &
while [ true ]
do
sleep 5s
status=$(wmctrl -l | grep "QEMU")
if [ "$status" != "" ] ; then
break
fi
done
WID="$(wmctrl -lx | grep "QEMU")"; QT_QPA_PLATFORM=xcb kdocker -qtw "${WID%% *}" -i ///usr/share/icons/breeze/devices/64/smartphone.svg &