Display Servers: X11 and Wayland
Video Activity
Join over 3 million cybersecurity professionals advancing their career
Sign up with
Required fields are marked with an *
or
Already have an account? Sign In »

Video Transcription
00:00
>> Hey Cybrarians.
00:00
>> Welcome back to the Linux+ course here at the Cybrary.
00:00
>> I'm your instructor Rob Goelz.
00:00
In today's lesson, we're going to
00:00
be discussing Display Servers.
00:00
Upon completion of today's lesson,
00:00
you are going to be able to understand the importance of
00:00
display servers in providing a GUI environment.
00:00
We're also going to learn about the X11
00:00
and Wayland display servers and then finally,
00:00
we'll be able to explain how
00:00
X11 and Wayland servers operate.
00:00
Display server is just something that handles
00:00
communication between the user interface,
00:00
IEU typing on your keyboard,
00:00
using your mouse and looking at the screen,
00:00
and the back and the Kernel of the operating system.
00:00
Communication is handled by a display server protocol,
00:00
and that protocol can operate over a network.
00:00
We'll see that later in this module when we
00:00
talk about console redirection.
00:00
Now display servers also
00:00
run something called a compositor.
00:00
in this program is what arranges
00:00
the display elements within a window to create an image.
00:00
When we drag a window around,
00:00
what we actually are doing is working with
00:00
the compositor to move that around on the screen.
00:00
Now displays servers don't actually provide a desktop,
00:00
that is generally done by a desktop environment,
00:00
which will be covered in the next lesson.
00:00
Now the X11 Display Server,
00:00
we actually talked about this briefly in Module 13,
00:00
but the X11 Display Server software
00:00
was created by MIT in 1984.
00:00
It's sometimes referred to as the X Windows Server,
00:00
or X Windows System or just X. X11 is
00:00
a legacy system that's still supported by the
00:00
X.org foundation is open source.
00:00
X11 is actually just X Windows System version
00:00
11 or X11 for short.
00:00
Now X11 does provide
00:00
basic GUI operations such as resizing,
00:00
clicking, and moving GUI programs on the screen.
00:00
But the way that it actually does that is
00:00
by calling out to a compositor.
00:00
We can see that over on
00:00
the right-hand side in the image here
00:00
that's courtesy of Wayland free desktop. org website.
00:00
What we see is the client's that are using
00:00
the X server to get a GUI on the server.
00:00
This server is calling for
00:00
the compositor when you're trying to
00:00
move stuff around on the screen
00:00
to redraw the screen for you.
00:00
Then the X Servers,
00:00
really just the middleman between the client,
00:00
that compositor and the backend with the kernel.
00:00
KMS, evdev and the kernel itself.
00:00
X11 includes drivers so
00:00
that everything can interact with each other,
00:00
so it has drivers for
00:00
the system hardware such as the mouse,
00:00
video card, keyboard monitor,
00:00
all the stuff that you're going to need.
00:00
Now X11 has configuration files
00:00
to look at and they're stored in a
00:00
couple of different places.
00:00
The first place /etc/X11/xorg.conf, that's
00:00
the default location and then you may also see in
00:00
some cases that several configuration files may be
00:00
stored in /etc/X11/xorg.conf.d,
00:00
that's just a directory where a lot
00:00
of configuration files are stored
00:00
if they're broken out across
00:00
many different configuration files.
00:00
In general though, if you're just looking at
00:00
the default xorg.conf file,
00:00
it's going to have a lot of sections in it.
00:00
We have a couple of them over
00:00
here on the right-hand side.
00:00
For example, we have the files section which shows
00:00
the locations of all the files that X11 needs to run.
00:00
There's also a section for input devices and the
00:00
handles the input for things like mouse and keyboards.
00:00
In fact, here we see that we have one input device,
00:00
the keyboard, and another input
00:00
device setting for the mouse.
00:00
There's also a modes section of this file that
00:00
handles display modes, resolutions,
00:00
and refresh rates on monitors
00:00
and the screen section that has
00:00
configuration settings for the video card
00:00
and the monitor as well.
00:00
In general though, don't touch X11 config,
00:00
it's tricky, it's really easy to mess up.
00:00
It's generally just installed
00:00
as part of a graphical desktop.
00:00
Again, we'll talk about desktop environments
00:00
in the next lesson,
00:00
but if you do for any reason,
00:00
have to modify it,
00:00
use the x.org- configure command.
00:00
It's going to detect all of
00:00
the hardware and create a new configuration file,
00:00
and that will be put into /root/ xorg.conf.new.
00:00
The Wayland Display Server was created in 2009.
00:00
It was generally just intended to replace
00:00
X11 because it's designed to be simpler,
00:00
more secure, and easier to develop and maintain then X11.
00:00
It's, also more lightweight
00:00
because it has newer kernel features
00:00
than what there was previously
00:00
available to the X11 environment.
00:00
Today, Wayland is actually
00:00
the default display server for Fedora,
00:00
which is an RPM based distribution,
00:00
and is also supported in GNOME.
00:00
Wayland is actually an umbrella term.
00:00
It's the name for the protocol,
00:00
so it covers the display server compositor in
00:00
the windows server as
00:00
one overarching term for all of them.
00:00
Now if you look at the Wayland layout here,
00:00
what Wayland likes to say is that
00:00
the compositor is the display server.
00:00
The display server doesn't have to call out to
00:00
a separate compositor to arrange windows elements.
00:00
There's a name for the compositor
00:00
in Wayland is called Weston,
00:00
but it's just all part of the same thing.
00:00
We can see that here on
00:00
the right-hand side in the image we have,
00:00
again, courtesy of Wayland.
00:00
We have two clients that are
00:00
talking to the Wayland compositor,
00:00
which is also the display server,
00:00
and that just talks between the clients
00:00
and into the back-end to the KMS evdev and the kernel.
00:00
There's no need to call out to compositor because it's
00:00
all handled through the same thing.
00:00
Now, Wayland's Compositor does provide a basic desktop.
00:00
It's swappable, but that's just meant as
00:00
a reference for developers to create their own.
00:00
It's not meant to be a full fledged a
00:00
development environment or desktop
00:00
environment for anyone to use.
00:00
Many desktop environments create
00:00
their own compositor even if they use Wayland.
00:00
For example, in CentOS,
00:00
Wayland is just configured to be
00:00
part of the GNOME Desktop Manager.
00:00
With that, in this lesson,
00:00
we covered the importance of display servers
00:00
and providing a GUI environment,
00:00
and then we talked about the X11 and
00:00
Wayland display servers and how they operate.
00:00
Thanks so much for being here and I look
00:00
forward to seeing you in the next lesson.
Up Next
Instructed By
Similar Content