A splash of blue and pink watercolors cover the background with logos on top of Wayland, and X.Org are displayed below the text of Which Display Server Are You using?

How to Check If Wayland or Xorg Is Being Used

  • Adam Douglas

For some time now the Linux display server has been going through a transition for the graphical environment. The well established X Window System (a.k.a. X, X11 or X.Org) has been the default, but slowly the mainstream Linux desktop distributions have changed the default to Wayland. Unfortunately not all legacy components or applications are compatible even with the use of the compatibility layer of XWayland. As a result it can be beneficial to know for certain which display manager is being used in order to debug issues. I will show how this can be accomplished using a variety of methods that will work in most circumstances.

What is a Display Server?

A program that is responsible for handling the coordination of input and output of the hardware, the operating system and as well as each other. All the coordination is sent using a communication protocol, such as Wayland or X11. Without a display server a computer could not be used graphically.


Instructions were tested using the following.

  • Arch Linux
  • Fish v3.6.1
  • GNU Bash v5.1.16
  • GNOME v44.3
  • KDE Plasma v5.27.4

GNOME Settings

  1. Open GNOME Settings.
  2. Click on “About” on the left-hand side.
  3. On the right-hand side look for the value under “Windowing System”.

    Screenshot of the about section within GNOME Settings that illustrates the location of Windowing System type just below GNOME version.

KDE Plasma

  1. Open System Settings.
  2. Click on “About” on the left-hand side.
  3. On the right-hand side look for the value under “Graphics Platform”.

    Screenshot of the about this system within System Settings that illutrates the location of the Graphics Platform type below kernel version.

Environment Variable

During the loading process environment variables are set and as a result we can confirm which display server is being used by getting the value of the variable using a terminal. For best results look at using “XDG_SESSION_TYPE” or “env” examples.

  • Display the value of the variable “XDG_SESSION_TYPE”.

      $ echo $XDG_SESSION_TYPE
  • Display the value of the variable “WAYLAND_DISPLAY”.

      $ echo $WAYLAND_DISPLAY

    If no value is returned then X11 is being used.

  • Use the “env” and grep commands to search all environment variables for X11 or Wayland.

      $ env | grep -i -e x11 -e wayland

Systemd Login Manager

For the Linux operating systems configured with Systemd the login manager can be accessed using the command “loginctl” in the terminal to confirm which display server is in use.

  1. Get the session ID.

     $ loginctl list-sessions
         3 1000 adam seat0 tty2
     1 sessions listed.
  2. Display session type to confirm display server being used.

     $ loginctl show-session 3 -p Type

System Processes

The example below list all the system processes and then searches through all the results to only display process with the name of “tty” using a terminal. Visually look through the returned results for X11 (Xorg) or Wayland.

$ ps -e | grep tty
20162 tty2     00:00:00 gdm-x-session
20167 tty2     00:00:16 Xorg
20200 tty2     00:00:00 gnome-session-b
23334 ?        00:00:00 kitty