Trying to understand the relationship between GUI protocols, Desktop Environments, and Window Managers

Hi all,

The longer I use Garuda, and reading through the forum posts, I'm slowly starting to glean the different layers and nuances between 3 components that, together, comprise our desktop/gui and ux... I'm hoping others more knowledgeable than I can help flesh this out for me, and/or point me into the right direction where I may be able to learn more.

If I understand this correctly, at the foundation there's the GUI protocol tech, and there are 2 common implementations:

  • X11 (traditional? is this the same as xorg? x server?)
  • Wayland (new? basically a rewrite/new way of doing X11?)

Then, you need (or not really? you can just run a window manager?) a desktop environment: which essentially provides some kind of framework that standardizes the implementation and hooks between the various desktop configurations. Examples include:

  • KDE
  • GNOME
  • MATE
  • Cinnamon
  • Deepin
  • lxt
  • xfce

Then, on top of the desktop environment, you have your Window Manager? But you don't NEED a desktop environment, per se, if you don't mind hand-configuring all the components the desktop environment manages for you? Window Managers include things like:

  • kwin
  • i3
  • qtile
  • Awesome WM

I think where I'm starting to get lost is the DE and the WM. Like, can you mix and match? Can I run a GNOME DE with KWin WM? I'm just not entirely sure I understand why these two components are different?

This also brings up another question! The graphical login screen/greeter! How's that fit in to any of this? Like, there's:

  • sddm
  • lightdm

Among a few others I've come across.....I remember the days when the only way to log in to linux was via terminal, and then you'd have to type startx to get a graphical screen.....and now I'm even more confused.

This is all because y'all garuda devs are too good about hiding all the complicated stuff behind the curtain so everything seemingly works like magic. :rofl: :rofl: :rofl:

Anyway, thanks for the read, and thanks in advance to any kind soul who'll help me....

1 Like

Yes, you are right on them. Wayland, compared to X11/Xorg/Xserver, is newer and have more functions, but not as stable and fully supported by most DEs out there such as KDE. The only DE that uses Wayland as default and fully support it is Gnome.

You indeed don't need a DE, a Window Manager is enough for minimal GUI usage. But most people won't just use Window Manager since it is a bit hard and time consuming to customize it.

You do can mix and match them, but most of the time there will be conflicts and you have to resolve them or just give up and use DE's default WM. (believe me I've tired and it is a nightmare)

Login screen you see is actually called "Display Manager" or DM for short. There are recommended or default DM for specific DE, but unlike most of the WM, using a different DM won't break your system. It basically serves as the startx method you mentioned, but automated and more user-friendly.

3 Likes

I tend to think of this the other way around. The DE is sitting on top of the Window Manager. Although, maybe it is more like the DE provides functionality around the Window Manager.

An additional thing that didn't mention is the compositor. The compositor is what provides effects such as animation/transparency/blur. Sometimes it is part of the WM and sometimes it is separate.

It depends on the DE. Some support replacing the WM and others do not.

The window manager does just what it says, it manages the windows. Everything else is outside of that. Panels, docks, desktop, application launchers, settings applications, etc, etc... A DE takes all those things and a WM and wraps them into a cohesive package.

The display manager generally sits on top of the display server directly.

The relationship between the DM and the DE is more complicated. Depending on the DE It can be integrated or not integrated.

That is what a DM replaces. It gives you a graphical login screen so you don't have to login to a terminal and manually start a graphical session. It is purely a convenience.

You can still do it the "old way" if you prefer.

6 Likes

Thank you @Jing and @dalto - you helped confirm some of my assumptions. I'll keep reading up on this! This has been very elucidating.

So, I have a question.....is it possible to switch between X11 and Wayland? Like, it's possible to have the DM serve multiple DE's upon login, can I have Gnome with Wayland setup alongside KDE with X11, for example, and just shift between the two DM/DEs at login?

Yes, for those DEs that support both, you can switch easily. If you have both sessions installed it should be an option on the DM login screen.

It may only be gnome & kde/plasma which support both.

So, once the greeter/DM loads, it would provide the option to switch DEs, but is there a way to also specify wayland vs x11? or is that another option in the greeter?

It is in the same spot. It will say something like plasma(wayland) for example.

For gnome you probably get both by default, for plasma you may have to install plasma-wayland-session

Fair warning that wayland support on plasma is still considered experimental.

Gotcha! Ok, cool :slight_smile: Yeah, I was just reading up on an alternative solution to Anbox which uses Wayland, and apparently uses more recent android images and works a little bit more natively than the anbox way. Still needs some of the same kernel modules (ashmem and binder), so I'll prob want to use an "anbox" kernel, but got somewhat dissuaded when falling down the Wayland rabbit hole and not wanting to mess around with my first ever stable linux experience! LOL

This was the article I was reading up on, in case anyone cares:

EDIT:
Oh yeah, and this too:

As well as this:
https://wiki.archlinux.org/title/Waydroid

The DM should offer to start the DE with X or with Wayland (if the DE support wayland).
And under wayland you need a layer to present your X application. It's xwayland that will allow you to call a X application under wayland. Otherwise you couldn't use any X application. If the DM doesn't offer you directly an option to start with wayland, usually there is possibility to start manually the DE under wayland directly from a Console (ctrl-alt-fn).
I hope it clarifies things ! This is rather complex and you may possibly read about X protocol and Wayland protocol on google.
read this one about wayland: https://en.wikipedia.org/wiki/Wayland_(display_server_protocol)
and this one about X11 :
https://en.wikipedia.org/wiki/X_Window_System

Regards,
BT

2 Likes

This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.