How to Enable X11 and Disable Wayland Window System

While accessing a remote machine, if you’re getting “remote display server is not supported”, then you need to enable X11 and disable Wayland to resolve the issue.

Recently, I installed AnyDesk on a GNOME-based Debian machine, and when I tried to connect this machine with another AnyDesk installation, I got the error message “Remote display server is not supported (e.g., Wayland)”. 

The above error restricts me from accessing my remote desk, which we going to solve today.

Why did the Error Occur?

What I found is that X11 is capable of transmitting displays over the network, which is not possible yet with the Wayland window system, which is the reason for the above error.

Is Wayland network transparent / does it support remote rendering?

No, that is outside the scope of Wayland. To support remote rendering, you need to define a rendering API, which is something I’ve been very careful to avoid doing. The reason Wayland is so simple and feasible at all is that I’m sidestepping this big task and pushing it to the clients.

This doesn’t mean that remote rendering won’t be possible with Wayland, it just means that you will have to put a remote rendering server on top of Wayland.

wayland.freedekstop.org

For those who are not aware of Wayland and X11, then I must give you a short introduction, and if you are really interested in and want to know more about this topic in depth, then you are too smart to search on the internet.

Wayland and X11 are technologies that allow you to take advantage of graphical interfaces, without them, you would be left with command-line interfaces.

Check this article to find the Difference between X11 and Wayland.

Know the difference between: ifconfig vs ip: Difference and Comparing Network Configuration

Switch from Wayland Window System to X11

There are multiple ways to switch from the Wayland window system to the X11 window system, such as the following:

  1. Easily switch from Wayland to the X11 Window system from the lockscreen.
  2. Modify /etc/gdm3/daemon.conf or /etc/gdm3/custom.conf to permanently disable Wayland.

Easily Switch from Wayland to X11 Window System from Lockscreen

This method is good for those who don’t have sudo access to modify /etc/gdm3/daemon.conf or /etc/gdm3/custom.conf, or if you just want to temporarily switch from Wayland to an X11 window system.

And personally, I found this method pretty convenient to use, so let me show you how you can change the window system from the lock screen.

Please read this guide first, then perform the subsequent steps.

First, you need to log out of your system by running the below code, or you can follow the conventional method to get logged out.

$ loginctl terminate-user $(users)

After that, press enter to login, and you will find the gear icon on the right bottom. Click on that, and you will find different options to choose from the list.

By default, Ubuntu users are running on X11, but if somehow it is on Ubuntu on Wayland, then change it to “Ubuntu”, and Debian-based users need to select “GNOME on Xorg”.

After that, log back in and go to Settings->About to check for new changes. In the Windowing System section, you will find X11 in the case of Ubuntu and Debian-based users.

Now you can try to access AnyDesk from a remote PC or perform the task that displayed the previous error.

Modify /etc/gdm3/daemon.conf or /etc/gdm3/custom.conf to Permanently Disable Wayland

The above method was pretty straightforward. You just need to click on the gear button to switch from Wayland to X11 and vice versa.

If you want to permanently disable the Wayland window system and use X11, then you should follow the below method.

Well, for this, you need to modify /etc/gdm3/daemon.conf or /etc/gdm3/custom.conf to disable the Wayland window system.

For that reason, you need to have sudo privileges.

I found Ubuntu uses /etc/gdm3/custom.conf and Debian 11 uses /etc/gdm3/daemon.conf so first check which file is available on your system.

$ ls -l /etc/gdm3/

According to the above output, you can run the below command with sudo:

$ sudo nano /etc/gdm3/daemon.conf 
                       OR
$ sudo nano /etc/gdm3/custom.conf 

In the above file, you need to search for “WaylandEnable=false”, which is commented out by default, and once you find out the line, you need to uncomment it to enable X11 and save the file.

Then restart your system to reflect the changes.

To verify the changes, you can go to the About section of your GNOME settings or else run the application that had the compatibility issues.

Wrap up

That’s all to enable X11 and disable the Wayland Window System.

I know that after following this article, you will be able to temporarily switch from Wayland to X11 and vice versa, along with the permanent steps to enable X11 on GNOME-based Linux distributions.

Check this article to learn: How to Automount Disk or USB in Linux {GUI/CLI}

Enjoy it!

0 0 votes
Article Rating
Subscribe
Notify of
guest
6 Comments
Oldest
Newest Most Voted
Inline Feedbacks
View all comments
analogtek
analogtek
2 years ago

Wayland is just a baby compared to Xorg. Xorg has a few problem’s, so say the so called expert’s. It works for me just fine (I not a gamer). If wayland ever gets to full! feature equality it might have a chance.

Name
Name
2 years ago

Thank you, this solved my problem with AnyDesk 🙂

Robert
Robert
1 year ago

Nice, thank you! It also solves Rustdesk wayland problems!

CozmicOrb
CozmicOrb
1 year ago

Thank you. Im an old Linux fan from the 90s just returning to it now after 25 years so back to being a newbie. I dont have a splash/login screen. It just goes straight through from bootup and eiditingg the config had issues like it just wouldnt save changes so using Kate to edit the file did it for me….Im also having issues with widgets not showing up so trying to figure that out. thank you

Sam
Sam
1 month ago

Thank you! Problem I have is in the same realm, I think. I have cronjobs that I have used for 10 years. They detect if a person is actually sitting at the computer logged in (not ssh’d in or logged out) and if so they popup a message to the user on the screen using gxmessage. With Debian 12 and Wayland this stopped working. I could not find any solution to this on the web. I read about WAYLAND_DISPLAY and wayland-0 – no luck. Tried instead notify-send and zenity – nope. If Wayland’s mission statement is that all apps must be modified to it and they are not willing to meet them half-way then its by definition “experimental software”. But the other simple thing your article helped with was that I had read about the pick X11 prior to login but I couldn’t find because I didn’t realise that the X11 choice was at the Password prompt and not at the Username prompt – of which your screenshots enlightened me.