Today we will talk about two display servers in Linux – X11 and Wayland.
A display server is a program whose main task is to coordinate data input and output from clients (users) to the rest of the operating system, hardware, and each other. The display server communicates with its clients using the display server protocol.
The display server is a key component of any graphical user interface, in particular the window system. Thanks to the display server, you can use your computer with a graphical interface. Without it, you could only use the command line interface.
The X11 display server is the successor to the X Window System. This system is very old, it has been operating since 1984. X11 is a network protocol. It describes how messages are exchanged between the client (application) and the display (server). These messages usually contain primitive drawing commands such as “draw a box”, “write this character at this position”, “the left mouse button was pressed”, etc.
X11 is outdated, it hasn’t been revised in over 30 years. Most features of the X Server protocol are no longer used. Almost all of the work that X11 did was shifted to individual applications and the window manager. And yet, all these old features still exist, reducing performance and security.
Wayland is being developed as a free, open source, community-led project to replace X11. It is modern, secure and with a simpler window system.
In Wayland, the display server is the Compositor program. It is a window manager that provides applications with an off-screen buffer for each window. The window manager combines the window buffers into an image representing the screen and writes the result to the display’s memory.
Wayland is also better in terms of security. In X11, you can do what is known as “keylogging”, allowing any program to exist in the background and read what’s going on in other windows open in the X11 realm. This simply won’t happen with Wayland, as each program works independently.
However, X11 still has many advantages over Wayland. Even though the Wayland project has been around for over ten years, it is not 100% stable. As of 2021, most Linux video games and graphics applications are still written for X11. In addition, many closed-source graphics drivers, such as those for NVIDIA GPUs, do not yet fully support Wayland.
All previous versions of Staffcounter for Linux (before 2.0.29) worked with the X11 server. This server allowed us to see what was happening in other programs, take screenshots, write down text, and correctly calculate pauses. However, all new versions of Ubuntu, Debian, and Red Hat come with a Wayland graphical server by default. In order for old programs to work on them, including Staffcounter, you need to switch the system back to using the X11 server while it is still possible. But what to do when X11 support stops?
Our developers have released a new version of Staffcounter for Linux, which can work both in X11 and in Wayland, though with some limitations so far.
Working in the Wayland environment, we will not see screenshots and web addresses yet. All this is hidden by the system from other programs. However, the names of running programs and window titles are still available, and this allows you to track what the employee was doing. In addition, keylogging will be a nice bonus, which already supports not only Latin graphics but also other languages too.
If you still want to have screenshots, you can disable the Wayland and enable the X11 back. Read the chapter Installing on Ubuntu 22 on this page.
There are features for installing and running the program on Debian. Some distributions disable the use of official repositories for downloading libraries. This must be done manually: Settings, About, Software Updates, menu, and Software repositories.