
Intro
After deploying the MeshCentral agents to my VMs, I noticed that some of them produced an error screen complaining about Xwayland. This was as simple as modifying a config file and restarting a service.
How to Fix “This platform is configured to use Xwayland”
The error looks like this:
This platform is configured to use Xwayland, please modify config to use Xorg.
I got it on VMs running a desktop with the default Wayland session. Older MeshCentral agents capture the screen only through X11, and Wayland doesn’t give them that access, so the remote desktop shows this message instead. The fix is to make GDM use Xorg.
Why Xorg instead of Wayland
Most distros default to Wayland now. By design, it doesn’t let one app capture the whole screen the way X11 does, which is what an X11-only agent needs. Xwayland doesn’t help either, since it only runs individual X11 apps inside a Wayland session.
Modifying custom.conf
Depending on your system, you will have to navigate to /etc/gdm or /etc/gdm3. Inside this folder you will find a file named custom.conf. It will look something like:
# GDM configuration storage
[daemon]
# Uncomment the line below to force the login screen to use Xorg
#WaylandEnable=false
[security]
[xdmcp]
[chooser]
[debug]
# Uncomment the line below to turn on debugging
#Enable=trueOn Debian and Ubuntu the file is /etc/gdm3/custom.conf. On Arch and Fedora it’s /etc/gdm/custom.conf.
All you have to do, is uncomment the line WaylandEnable=false. After doing so, it should look like:
# GDM configuration storage
[daemon]
# Uncomment the line below to force the login screen to use Xorg
WaylandEnable=false
[security]
[xdmcp]
[chooser]
[debug]
# Uncomment the line below to turn on debugging
#Enable=trueIf the WaylandEnable line isn’t there, add it yourself under [daemon].
Restarting the gdm service
Once the modification is in place, you just have to issue the command:
service gdm restartOn systems where gdm3 is the service name, use:
sudo systemctl restart gdm3Then log out and back in, or reboot, so the login screen starts an Xorg session. If it offers a session choice, pick GNOME on Xorg.
Done!
After restarting gdm, you will be able to access the VM’s desktop using MeshCentral.