How to Check: Xorg or Wayland Display Server?

2 min


Here’s how you can quickly check whether you are running Xorg or Wayland Display Server.

With every passing day, the modern Wayland display server is making its way to all Linux distributions. Although the legacy Xorg is still relevant and will stay, Wayland is undoubtedly better in security and other performance aspects.

However, Xorg will not completely phase out anytime soon. Probably never.

If you are running any Linux distribution, how can you check whether you are running Xorg or Wayland? Here’s how.

Wayland or Xorg: Which one are you running?

  • Open a terminal window (CTRL+ALT+T) in your Linux distributions (e.g. Ubuntu, Fedora, Arch…etc.).
  • Then type the following command and hit enter.
echo $XDG_SESSION_TYPE
  • The output of the command will tell you whether the current session is Wayland or Xorg (X11).
[debugpoint@fedora ~]$ echo $XDG_SESSION_TYPE
wayland
This command can give you details about Xorg or Wayland
This command can give you details about Xorg or Wayland

That’s simple. However, there are other ways as well.

Other methods

Using Settings

If you want a graphical method, open your Linux distribution settings application. In the about section, you should see the Wayland/X11 mentioned under some label.

For example, in the GNOME Settings, you can find it under “Windowing system”, as shown below.

In GNOME Settings you can find it
In GNOME Settings, you can find it

Using session values

You can also find it out using loginctl which is the systemd login manager. Remember, it only works for systemd-based systems.

Open a terminal and run the below command. You can see the session id value. In this example c2.

loginctl

Now, pass the session id to the following command to get the display server type. Make sure to change c2 to your system spec.

loginctl show-session c2 -p Type
Using loginctl to find out
Using loginctl to find out

Wrapping Up

So, these are some of the ways you can find out whether you are running Systemd or Xorg in your Linux system. You can also use the above commands in your shell scripts for further process automation.

Cheers.


Arindam

Creator of debugpoint.com. All time Linux user and open-source supporter. Connect with me via Telegram, Twitter, LinkedIn, or send us an email.
Subscribe
Notify of
guest

This site uses Akismet to reduce spam. Learn how your comment data is processed.

0 Comments
Inline Feedbacks
View all comments
0
Would love your thoughts, please comment.x
()
x