Desktop
This story consists of the notes I’m taking as I study and learn how KDE Plasma works. Every time I go over it and edit and polish it, I learn more about Linux and the story improves.
Read the manual. Do your research. Investigate and learn how Linux works. Right now, I’m reading The Z Shell Manual. At first it was incomprehensible. Its like reading a dictionary. Once you get into it, go back and read those first few sections again. They will make a lot more sense.
Read the whole story, all the way through, as fast as you can. Don’t try to remember all the details. Just read as fast as you can to get finished. Get those ideas and patterns imprinted in your long term memory. You’ll solidify them by using Linux. Work on understanding how Linux works.
Linux is in the process of transition from an old, modular architecture, to a new, more efficient system based on systemd and Wayland. Investigate how the kernel, the file system, systemd and Wayland all work together to produce what you see on the screen. sysVinit and X11 is the old way. systemd and Wayland is the new way.
We have to make the transition gradually, to bring everyone along. So now, Linux is in a confusing, often changing, status of gradually building up the new system, at the same time gradually deprecating the old system. There are a lot of valuable old computers, using the old system, so we can’t just change everything suddenly. Writing the code for the new systems is also a complex problem that must be done carefully.
X11
The X server is the old program, a dedicated terminal that displays the desktop, windows and handles input devices such as keyboards, mice and touchscreens. Clients are the applications.
X11 and Kwin are the old system. Wayland, with the Weston compositor, is the new window manager and compositor all rolled into one. Learn how they work and how to use them to create wonderful works of art.
Kwin
Kwin is the KDE Plasma 5 compositor for X11. It will run just fine with Wayland. Kwin is a very well developed compositor that the KDE community does not want to give up just yet. At this point, Weston is a new, relatively lightweight, compositor built into the Wayland window manager.
Kwin enables you to customize the windows on your computer’s desktop. You can right click on a window decoration or open system settings to use Kwin’s new, easier to use, configuration panel. You can switch between windows by holding your alt button down while you tab through the windows that are open on your desktop.
Weston: Understanding the Wayland Reference Compositor
Weston is a Wayland compositor, which serves as a lightweight, efficient and flexible reference implementation of the Wayland display server protocol. It plays a vital role in showcasing how Wayland works and serves as a testing ground for new Wayland features. Weston provides a minimal yet functional desktop environment and is often used in embedded systems, development environments and as a demonstration of Wayland’s capabilities.
Weston is a compositor and the official reference implementation of Wayland. A compositor in the context of display servers is responsible for managing windows, drawing their contents on the screen and ensuring smooth graphical interactions. Unlike traditional display servers such as X11, which rely on a separate compositor, Wayland integrates the compositor directly into its architecture.
Demonstrating how Wayland can be implemented, providing a testbed for new Wayland features and offering a lightweight and efficient compositor for use in specific environments, such as embedded systems, is Weston’s main goal.
The Wayland protocol ensures compatibility with Wayland-based clients. It supports a variety of backends for rendering, including OpenGL ES, DRM (Direct Rendering Manager), and framebuffer (fbdev). It can run on various hardware and platforms, including desktops, virtual machines and embedded devices.
Weston is designed to be minimal and efficient, making it suitable for resource-constrained systems. Developers can extend Weston using plugins to add new functionality or adapt it to specific use cases. Includes support for touchscreens, multi-display setups, HiDPI displays and hardware acceleration.
Weston operates as a Wayland compositor, directly managing the display and client applications. Weston implements the Wayland protocol, enabling communication between the compositor (server) and Wayland clients (applications).
Applications connect to Weston as Wayland clients, sending their graphical content and receiving input events. Weston handles rendering by composing the graphical surfaces (windows) of clients into a single image displayed on the screen. Depending on the backend, rendering may be hardware-accelerated using OpenGL or Vulkan, or it may use software rendering.
Weston processes input events (e.g., keyboard, mouse, touchscreen) and forwards them to the appropriate Wayland clients. Input focus is managed by Weston, ensuring only the active client receives input. Multiple different backends are available to adapt to different environments:
- DRM Backend: Directly interfaces with the GPU via the Direct Rendering Manager for efficient rendering.
- X11 Backend: Runs Weston on top of an existing X11 server.
- Wayland Backend: Runs Weston as a client of another Wayland compositor.
- Headless Backend: Allows Weston to run without any display hardware for testing purposes.
Weston supports various Wayland extensions, such as:
- XDG-Shell: Manages window positioning and interaction.
- IVI-Shell: Designed for in-vehicle infotainment systems.
- Weston-specific Extensions: Enhance functionality for specific use cases.
Weston acts as a model for developers building custom Wayland compositors or applications. It is used in lightweight environments where a full desktop environment is unnecessary. It provides a simple platform for testing Wayland protocols and graphical applications.
Weston differs from other Wayland compositors like Mutter (GNOME) and KWin (KDE) in its simplicity and purpose. While Weston is a reference compositor meant for development and lightweight systems, others are full-featured compositors tailored to specific desktop environments.
Weston is lightweight and minimal. It is ideal for embedded and resource-constrained systems. It is easy to extend and modify. Weston lacks advanced features found in full desktop compositors (e.g., advanced window management, desktop effects). It is not intended as a primary desktop environment for end users. Install Weston on a Wayland-capable system using your distribution’s package manager. For example:
sudo apt install weston
After installation, you can start Weston with the weston
command. Depending on your system setup, you may need to configure the appropriate backend (e.g., DRM or Wayland). Weston continues to evolve alongside the Wayland protocol, serving as a development and testing platform for new features. As Wayland adoption grows, Weston will remain an essential tool for developers building custom compositors and testing Wayland-based applications.
Weston is a lightweight and efficient Wayland compositor that demonstrates the power and flexibility of the Wayland protocol. While its primary role is as a reference implementation, Weston has found practical applications in embedded systems, testing and development. By understanding how Weston works, developers can gain insights into the Wayland ecosystem and create tailored compositors for specific use cases.
Wayland
Wayland is a simpler, easier to develop and maintain, replacement for the X Window System. It is a protocol for a compositor to talk to its clients, as well as a C library implementation of that protocol.
The compositor can be a stand-alone display server, an X application or a Wayland client itself. The clients can be traditional applications, X servers (rootless or fullscreen) or other display servers.
The Weston reference implementation of a Wayland compositor is part of the Wayland project. Weston can run as an X client or under Linux KMS. The Weston compositor is a minimal and fast compositor, suitable for many embedded and mobile applications. Wayland is a protocol that defines how the compositor generates what you see on the screen. The compositor serves the desktop and manages the windows. Most of the controls will be in the application windows.
KMS, Kernel Mode Setting, involves making changes in the kernel to change the appearance of your desktop? Wayland combines the compositor and the window server into one lightweight component. It allows clients (applications) to make most changes on your desktop and uses KMS for deeper changes.
XWM is the X Windows Manager. It is part of the Wayland server. Xwayland is a client that runs legacy X11 applications on top of Wayland. The Wayland Window Manager (WWM) can manage all windows by using XWM as a bridge between the Wayland server and Xwayland clients.
Normally, Wayland only spawns one Xwayland server and all X11 clients use that one server. So, the X11 clients are not protected or isolated from each other. The Wayland compositor can override this default behavior by spawning application specific instances of Xwayland. Wayland clients are naturally isolated from X11 clients.
https://wayland.freedesktop.org/docs/html/
Wayland: The Future of Linux Display Protocols
Wayland is a modern display server protocol designed to replace the aging X11 system in Linux. It aims to simplify and streamline the way graphical applications communicate with the display hardware and input devices, offering better performance, security and reliability. Unlike X11, which dates back to the 1980s, Wayland is built to meet the needs of modern graphical environments.
Wayland is not a display server itself but a protocol that defines the communication between a compositor (the server) and client applications. A compositor under Wayland handles the tasks of both window manager and display server, managing windows, rendering their contents and forwarding input events.
The Wayland protocol defines how applications interact with the compositor. It is compositor-centric. It integrates window management and rendering into the compositor for efficiency. It reduces complexity, focusing on simplicity and performance. Wayland allows for custom compositors tailored to specific environments. Examples of Wayland compositors include Weston (reference implementation), Mutter (used by GNOME) and KWin (used by KDE).
How Wayland Works
Wayland operates using a client-server model where the compositor acts as the server and applications act as clients. Applications (clients) render their graphical content into buffers, often using OpenGL, Vulkan or other GPU-accelerated technologies. The client does not manage how or where its windows appear on the screen; this is the compositor’s responsibility.
Rendered content is shared with the compositor via shared memory or GPU buffer sharing mechanisms (e.g., DRM, GBM or EGL). Wayland does not dictate how rendering is done, giving clients full flexibility.
The compositor is responsible for deciding where windows are placed and managing their stacking. Compositing (combining) all client buffers into a single image displayed on the screen. Receiving input events (keyboard, mouse, touch) from the hardware, interpreting them and sending them to the appropriate client.
Wayland compositors communicate directly with the kernel’s Direct Rendering Manager (DRM) and input subsystems, bypassing the need for intermediary layers like X11.
Wayland can be extended with additional protocols to support features like window decorations, screen capturing or virtual desktops. Common extensions include XDG-Shell Protocol for window management and resizing. A library for building custom compositors.
Wayland in Practice
Many modern Linux desktop environments have adopted Wayland as their default or experimental display server. GNOME has supported Wayland since version 3.10 and uses it by default in many distributions. KDE Plasma offers Wayland support through its KWin compositor.
Weston, the official Wayland reference compositor used for testing and development. Sway is a tiling window manager designed as a Wayland alternative to i3. Wayland is widely used in resource-constrained environments due to its lightweight nature.
Wayland’s modularity allows it to be extended for specific use cases:
- XDG-Shell: Standardizes window management for desktops.
- Wlroots: A compositor library simplifying custom compositor creation.
- XWayland: Enables legacy X11 applications to run on Wayland-based systems.
These extensions enhance Wayland’s functionality while maintaining its core simplicity.
Wayland represents the future of Linux graphical environments, addressing the limitations of X11 with a modern, streamlined approach. By combining efficiency, security and flexibility, Wayland provides a robust foundation for both desktop and embedded systems. While challenges remain in adoption and compatibility, the ongoing development of Wayland and its ecosystem is steadily paving the way for a more efficient and secure Linux graphical stack.
System Settings
Access your system settings by clicking on your Application Menu>System Settings. I usually select my system settings as one of my favorite applications, if it isn’t already selected by default.
The first application I install on a new KDE installation is Kcolorchooser. Use it to help you set all your applications up with the same color scheme.
Start out with appearance and select a color scheme and edit the color scheme to get your desktop to be a work of art created by you. Select Hardware>Power Management and set your power management to adjust the idle time before your computer screen turns off.
Select input devices to adjust your mouse pad, so that you can scroll your display with one finger along the one edge of your mouse pad. You can also set numlock on at start up. Look around in your system settings and adjust your system the way you like it.
Sources: https://wayland.freedesktop.org/docs/html/