Linux Jargon Buster: What is a Display Server in Linux? What is it Used for?

In Linux related articles, news and discussions, you’ll often come across the term display server, Xorg, Wayland etc.

In this explainer article, I’ll discuss display servers in Linux.

What is display server in Linux?

A display server is a program which is responsible for the input and output coordination of its clients, to and from the rest of the operating system, and among the hardware and the operating system. Basically, thanks to a display server, you can use your computer graphically (GUI). Without the display server, you would only be restricted to a command line interface (TTY).

The display server provides the framework for a graphical environment so that you can use mouse and keyboard to interact with applications.

The display server communicates with its clients over the display server protocol, like X11. The display server is a key component in any graphical user interface, specifically the windowing system.

Don’t confuse display server with desktop environment. The desktop environment uses display server underneath it.

Sounds familiar but it is not fully clear? Let me explain.

Display server communications protocols in Linux

Display Server Linux

There are three display protocols available in Linux, the X11, Wayland and Mir. I’ll give you a brief introduction for these display servers.

X11

The X11 (also refer as X) is the legacy display server that has been existed for years. It is the most common display server used in Linux distributions.

X Architecture 1
X Architecture

The X11 communication protocol, uses the X.org Server display server. It receives input events from device drivers and makes them available to one of its clients.

The display server also receives data from its clients, it processes the data and does the compositing and on Linux it passes the data to one of three kernel components – the DRM, gem or KMS driver.

The X.Org Server is a display server that relies on a second program, the compositing window manager, to do the compositing. Examples are Mutter or KWin. GNOME uses Mutter.

Wayland

As per its website, Wayland is “intended as a simpler replacement for X, easier to develop and maintain”.

And indeed Wayland is the modern display server that is supposed to replace the legacy X display server.

Its adoption is still a work in progress. Ubuntu tried to switch to Wayland as the default display server with version 17.10 but the experiment met with negative feedback.

A lot of GUI applications and their frameworks depend on the X server. These applications didn’t work as intended on Wayland.

This forced Ubuntu to stay on X as default display server. It still provides the option to use Wayland but it is not default anymore.

An overwhelming majority of distributions use X display server by default even today.

Wayland display server architecture
Wayland Architecture

Display servers that put into effect the Wayland display server protocol, are called Wayland compositors. Like any X11, a Wayland compositor is responsible for handling input and output for its clients but also does the compositing – in contrast to X11.

A few Wayland compositors are Weston, Mutter, KWin or Enlightenment.

Mir

The Mir display server comes with its own Mir display server protocol which differs to those used by X11 and Wayland. It was developed by Canonical, as part of the development of Unity, and was intended to be the display server of choice for Ubuntu.

As of 2017, it has been replaced with the Wayland display server for desktop editions of Ubuntu, although Mir’s development continued for Internet of Things (IoT) applications.

Why are we still using Xorg?

Wayland as it is relatively new, is not very stable yet, compared to Xorg. The programs, which act as clients, in order to communicate with a display server, must know how to do it.

For this reason, many programs might not run when using Wayland. Ubuntu’s experiment to switch to Wayland by default confirmed this.

Conclusion

I hope you have a bit better understanding of display server concept in Linux. I have tried to not go into too much technical details but I could not avoid them altogether.

Your feedback and suggestion is welcome.

About the author
Dimitrios

Dimitrios

Dimitrios is an MSc Mechanical Engineer but a Linux enthusiast in heart. His machines are powered by Arch Linux but curiosity drives him to constantly test other distros. Challenge is part of his per

Become a Better Linux User

With the FOSS Weekly Newsletter, you learn useful Linux tips, discover applications, explore new distros and stay updated with the latest from Linux world

It's FOSS

Great! You’ve successfully signed up.

Welcome back! You've successfully signed in.

You've successfully subscribed to It's FOSS.

Success! Check your email for magic link to sign-in.

Success! Your billing info has been updated.

Your billing was not updated.