Miracle-WM tiling window manager for Mir hits 0.2.0

What are Mir and Wayland all about anyway?

Mir-based tiling window manager Miracle-WM version 0.2.0 is here, building on the basis of the initial release. Will Mir bring peace and harmony and convergence after all?

Even if developer Matthew Kosarek's own roadmap says that he only expects it to start settling down with the next version, which he hopes to release at the beginning of June, it's good to see work continuing. The open source landscape is littered with the rusting hulks of thousands of abandoned projects that never got a second version after their initial release.

We covered the initial release of Miracle-WM back in February.

Miracle-WM is a prototype tiling window manager, somewhat in the mold of SwayWM, a tiling WM for Wayland inspired by the X11-based i3. As we described when GNOME starting investigating tiling, such environments are the modern weapon of choice for a lot of Linux folks who mainly live in the terminal. Quite a lot of people prefer to use console-based text-only tools rather than a graphical file manager, a graphical text editor, graphical messaging clients, and so on. Such console apps generally have purely keyboard-oriented UIs and once you've learned them, they can be extremely fast and efficient. "Edit at the speed of thought" is the tagline of a popular guide to the Vim editor, which is how experienced terminal users describe the feeling.

(If you know the keystrokes of the standard CUA interface, driving Windows – especially one of the older, faster versions – feels rather similar, since almost all Windows software shares the same UI and keystrokes. Well, until Office 2007 and its Ribbon anyway.)

What is interesting to The Reg FOSS desk is that Miracle-WM runs on top of Mir, as does the experimental Miriway compositor we looked at last year. This is relatively unusual in the world of Wayland.

What is Wayland anyway?

Wayland is on its way to replacing the venerable X.org and X11, which will turn 40 years old in June, but there's still a lot of misunderstanding of what it is. Wayland isn't a new display server. X11 isn't either. The trouble is that when one implementation of something becomes so ubiquitous that most people have never seen anything else, a sort of synecdoche can occur. X.org is not the only display server that implements X11, but it is the only one for modern Linux, FreeBSD, and NetBSD. Even OpenBSD's Xenocara is still based on X.org.

Most proprietary UNIX variants included their own, equally proprietary X11 servers. Long ago, in the early days of Linux, there were commercial X11 servers for Linux too, such as Xi Graphics' Accelerated-X and Metrolink Metro-X. These were replaced by a community-built FOSS X11 server called XFree86. In 2004, a difference in opinion over how to run the XFree86 project led to a new fork of the code; that server ended up being known as X.org.

For about 20 years, the X.org X11 server has been the default choice for FOSS Unix-like OSes for commodity computers, but it's not the only one. The X11 protocol is a standard, and even today, there are still more than one other server that implements it.

The way X11 works is that the computer that will display a GUI runs a display server, and other applications connect to it as clients and can display windows. (Yes, the bit you look at is the server, and the programs are clients, and yes, the terminology is confusing.)

Having just one full-screen program would be limiting, so normally, most computers with X11 run a window manager, which divides the screen up into multiple windows – maybe overlapping, maybe stacked, maybe tiled neatly side-by-side, it doesn't really matter – which lets the user see and interact with more than one program at a time on their screen. So the minimal configuration is usually an X11 server and a window manager.

This first came to X.org in an extension called AIGLX and went mainstream in about 2006 when Compiz appeared. Since then, most graphical Linux machines run a rather more complicated setup, which involves a program called a compositor drawing the contents of windows into textures on the surface of rectangles in the memory of a hardware 3D accelerator, which composes these rectangles together into an on-screen image – a technology first seen in Mac OS X 10.2 and dubbed Quartz Extreme.

Wayland is a new, simpler protocol for programs to draw output on a screen. Most Wayland implementations combine into a single program, called a Wayland compositor, the functions of what would be several separate programs in an X11 system: a window manager, a window compositor, and a display server. (Yes, this means that a Wayland compositor is a different thing from an X11 compositor. We warned you that the terminology is confusing.)

Incidentally, X11 was designed to work over networks as well as locally, but that is because it predates even 2D graphics accelerators, let alone modern 3D cards. A common criticism of Wayland is that it doesn't work over network connections … but neither does all this fancy OpenGL-based stuff. Meanwhile, there are now tools like Waypipe, which lets Wayland run over SSH.

Compositors everywhere

If you are keen enough, Wikipedia has some good articles, tracing the development from Xgl to AIGLX to the modern Direct Rendering Infrastructure, including the kernel's Direct Rendering Manager. (Not to be confused with the other DRM involved in video, Digital Rights Management. The TLAs are just one of the things making this confusing.)

Pretty much all traditional Linux desktops were built around the X11 model, which means that most have their own specially written window managers. KDE has kwin, Xfce has xfwm4, GNOME has Mutter, and so on. To move these environments to Wayland, those window managers have to be rewritten to be full compositors. That is quite a significant task, and it's why there are, so far, still basically two full desktop environments using the new protocol, GNOME and KDE.

(This dependence upon the compositor is also one of the weak points of the Wayland design, which we have rarely seen mentioned online but did come up at last year's Ubuntu Summit. For all that it's complex, the X.org X11 server is very solid. So long as you can get it configured and displaying correctly, it almost never fails. An X11 window manager is just one relatively small part of the Linux graphics stack, and if your window manager crashes and dies, which can happen, it's not the end of the world. Your programs keep running, and if you can get to a command line, you can try to restart the WM, or run another one instead. If the window manager is also acting as your Wayland compositor, though – which is relatively new and unproven code – then if that crashes, you lose everything. Your entire GUI and all GUI programs that were running.)

It's looking quite likely that LXQt 2.1 will be the third full Wayland-based desktop, although it's possible that Linux Mint's Cinnamon 6 may get there first.

If you don't need a full desktop, a simpler window manager on its own may be enough. As such, there are quite a few of these now, and as you can see from the Arch wiki's list, many of them are based on an existing compositor called wlroots.

This plethora of different Wayland compositors is why we are still watching the development of Canonical's Mir display server, over a decade after The Reg covered its announcement. Almost uniquely among Wayland projects, Mir isn't tied to a particular windowing environment or desktop.

In turn, that's why we're interested in Miracle-WM. It runs on Mir, as does the Lomiri desktop, which is now included in Debian. Mir also forms part of Ubuntu Touch. These effectively demonstrate that Mir can be used by separate projects. There's a possibility that this tool, which survived the cancellation of Canonical's fondleslab efforts in 2017, may yet stage a comeback in the brave new Wayland world. ®

More about

TIP US OFF

Send us news


Other stories you might like