Troubleshooting

How to Fix “display_server_not_supported” Error in AnyDesk on Linux

Himanshu Pal

Himanshu Pal

How to Fix “display_server_not_supported” Error in AnyDesk on Linux

This error happens when AnyDesk tries to run on Wayland, which it doesn’t fully support on many Linux distributions. The simplest way to fix it is to switch to Xorg by editing the GDM configuration.


Step-by-Step Fix:

1. Open the GDM configuration file:

sudo vim /etc/gdm3/custom.conf #you can use editor of your choice like nano

2. Update or add the following lines under the [daemon] section:

[daemon]
# Force the login screen to use Xorg
WaylandEnable=false

# Optional: enable automatic login (replace $USERNAME with your user)
AutomaticLoginEnable = true
AutomaticLogin = $USERNAME

Save and close the file.

3. Restart GDM or reboot the system:

sudo systemctl restart gdm3
# or
sudo reboot

This forces your system to use Xorg, which is supported by AnyDesk, and removes the “display_server_not_supported” error.

Tip: If you’re on Ubuntu 22.04 or newer, this is a common issue since Wayland is enabled by default.

How to Confirm You're Now Running Xorg

After rebooting, you can verify that your session switched from Wayland to Xorg. Open a terminal and run:

echo $XDG_SESSION_TYPE

If it prints x11, the change worked and AnyDesk should connect without the error. If it still says wayland, the GDM change did not take effect — double-check the file path and that you removed the leading # from the WaylandEnable=false line.

Alternative Fix: Switch to Xorg at the Login Screen

If you would rather not edit any configuration files, you can switch sessions directly from the login screen:

  1. Log out (or reboot) to reach the GDM login screen.

  2. Click your username, then click the small gear icon in the bottom-right corner.

  3. Select "Ubuntu on Xorg" (or "GNOME on Xorg" on other distributions).

  4. Enter your password and log in.

This applies only to the current session, so it is handy for testing before making the change permanent with the GDM edit above.

If the Error Still Appears

If AnyDesk continues to show display_server_not_supported after switching to Xorg, work through these checks:

  • Confirm the session type with echo $XDG_SESSION_TYPE as shown above — most lingering issues are simply a session that never actually switched.

  • Update AnyDesk to the latest version. Older builds had weaker display-server detection.

  • Restart the AnyDesk service after changing sessions:

sudo systemctl restart anydesk
  • Headless or server setups: if the machine has no display manager at all, AnyDesk needs a running X session to share. On a headless server you may need to install and configure one, or use AnyDesk's unattended-access setup.

Wayland vs. Xorg: Why This Happens

Modern Linux distributions ship two display servers. Wayland is the newer default on Ubuntu 22.04 and later, Fedora, and others; Xorg (X11) is the older, more widely compatible one. Many remote-desktop tools — including some AnyDesk versions — rely on X11 APIs that Wayland deliberately restricts for security reasons. Forcing Xorg sidesteps that incompatibility, which is why the fix above resolves the error on most systems.

Frequently Asked Questions

Will switching to Xorg affect anything else?

For most desktop users, no — Xorg is stable and well-supported. You may notice minor differences in some Wayland-specific features (such as per-monitor fractional scaling), but day-to-day use is unaffected.

Can I switch back to Wayland later?

Yes. Re-open /etc/gdm3/custom.conf, comment out or remove the WaylandEnable=false line, and reboot.

Does this work on non-Ubuntu distributions?

The concept is the same, but the config file location differs. On distributions using GDM the file is usually /etc/gdm3/custom.conf or /etc/gdm/custom.conf. Other display managers (such as SDDM on KDE) use their own configuration.

Once you are on Xorg, AnyDesk should launch and connect normally, and the display_server_not_supported error will be gone for good.