I’m wondering if it’s possible to query Mir somehow to ask it if it has any active client connections. Is it possible to communicate on the socket that miral-kiosk creates and request the information ?
It could be possible to do it by examining the kernel socket information in combination with the kernel processes information, but that feels a bit more brittle. It would be nice if there was some kind of query, or way of getting miral-kiosk to expose the info if required.
Sounds like you’re looking for the wlr_foreign_toplevel_management_unstable_v1 Wayland protocol extension. This is implemented by Mir, but disabled by default: It needs to be configured explicitly because it allows “snooping”.
I’m not sure if you’re asking about the mir-kiosk snap here (there’s no snap called miral-kiosk), but this should help you: