Install script to set X root window property for Xwayland on-demand
In case we have Xwayland on-demand, the X11 root property will not be set. Usually not a big deal, unless we have a process running as root trying to use the X server (e.g. anaconda).
A simple solution should be to install a script that copies the property from DBus over to X11, i.e. something like /etc/xdg/Xwayland-session.d/00-at-spi
with
#!/bin/sh
ADDR="$( busctl call --user org.a11y.Bus /org/a11y/bus org.a11y.Bus GetAddress )" || exit 0
ADDR="$( echo $ADDR | sed 's/s "\(.*\)"/\1/' )" || exit 0
exec xprop -root -format AT_SPI_BUS 8s -set AT_SPI_BUS "$ADDR"
This will be executed automatically by gsd-xsettings when Xwayland starts up (and before any client can use the X server).
Edited by Benjamin Berg