Bottom line: This is considered a part of wayland security and will not be resolved upstream. The upstream solution is to run graphical apps from the menu, not the command line.
Up to Ubuntu how to "resolve" this "problem" but Fedora decided 2 years ago to work on the grahpical tools.
xhost is a work around for now and will remain so as long as apps have xwayland support.
Just a heads up, you do understand that this is a feature , not a bug ?
https:/ /bugzilla. redhat. com/show_ bug.cgi? id=1274451
That bug is 2 years old and marked as "Status: CLOSED WONTFIX" both with Fedora and upstream with Wayland
See https:/ /fedoraproject. org/wiki/ How_to_ debug_Wayland_ problems# Graphical_ applications_ can.27t_ be_run_ as_root_ from_terminal
And
https:/ /lists. fedoraproject. org/archives/ list/devel% 40lists. fedoraproject. org/thread/ A6VXI4WAGSIIWGO TAVNDBVS4VFYXIT HA/#2YU2RBYCXQS CGHGP772W5LRXUM TSINHA
XWayland bug report (from 2015) https:/ /bugs.freedeskt op.org/ show_bug. cgi?id= 91071
Bottom line: This is considered a part of wayland security and will not be resolved upstream. The upstream solution is to run graphical apps from the menu, not the command line.
Up to Ubuntu how to "resolve" this "problem" but Fedora decided 2 years ago to work on the grahpical tools.
xhost is a work around for now and will remain so as long as apps have xwayland support.