如何在禁用Wayland前检查X11显示管理器是否已安装?
Great question—this is a super common pitfall when switching from Wayland to X11 to fix issues like Zoom screen sharing. Let’s break down the steps to verify X11 is present on your system, so you avoid the login problem you ran into on the other machine.
Quick Checks for X11 Installation
Here are a few reliable ways to confirm X11 is ready to use:
1. Check for the Xorg Binary
Open a terminal and run either of these commands—if X11 is installed, you’ll get a file path as output:
which Xorg # OR command -v Xorg
If there’s no output at all, X11 isn’t installed on your system.
2. Verify X11 Packages (Distro-Specific)
Different Linux distros package X11 differently, so use the command matching your system:
- Debian/Ubuntu-based systems:
Look for a line starting withdpkg -l | grep xserver-xorg-coreii—that means the core X11 package is installed. - Fedora/RHEL/CentOS:
If the package appears in the list, X11 is installed.dnf list installed xorg-x11-server-Xorg - Arch Linux:
A result here confirms X11 is present.pacman -Q | grep xorg-server
3. Check Login Session Options
If you use a display manager like GDM, LightDM, or SDDM:
- Log out of your current session.
- On the login screen, look for a gear/settings icon next to your username.
- If you see options like GNOME on Xorg, Xfce (X11), or similar, that means X11 is already set up and ready to use.
What to Do if X11 Isn’t Installed
If your checks show X11 is missing, install it before disabling Wayland:
- Debian/Ubuntu:
sudo apt update && sudo apt install xserver-xorg-core xinit - Fedora:
sudo dnf install xorg-x11-server-Xorg xorg-x11-xinit - Arch:
sudo pacman -S xorg-server xorg-xinit
Emergency Fix if You Already Disabled Wayland and Can’t Log In
If you skipped the check and now can’t access your desktop:
- Press
Ctrl+Alt+F3(or F4-F6) to switch to a TTY terminal. - Log in with your username and password.
- Re-enable Wayland by editing the display manager config (example for GDM):
Find the linesudo nano /etc/gdm3/custom.confWaylandEnable=false, comment it out by adding a#at the start, then save and exit (Ctrl+O,Enter,Ctrl+X). - Reboot with
sudo reboot, then install X11 before trying to disable Wayland again.
内容的提问来源于stack exchange,提问作者Aditzu

