The uncertain possible futures of Unix graphical desktops

July 26, 2024

Once upon a time, the future of Unix desktops looked fairly straightforward. Everyone ran on X, so the major threat to cross-Unix portability in major desktops was the use of Linux only APIs, which became especially D-Bus and systemd related things. Unix desktops that were less attached to tight integration with the Linux environment would probably stay easily available on FreeBSD, OpenBSD, and so on.

What happened to this nice simple vision was Wayland becoming the future of (Linux) graphics. Linux is the primary target of KDE and especially Gnome, so Wayland being the future on Linux has gotten developers for Gnome to start moving toward a Wayland-only vision. Wayland is unapologetically not cross-platform the way X was, which leaves other Unixes with a problem and creates a number of possible future for Unix desktops.

In one future, other Unixes imitate Linux, implementing enough APIs to run Wayland and the other Linux things that in practice it depends on, and as a result they can probably continue to provide the big Linux-focused desktop environments like Gnome. I believe that FreeBSD is working on this approach, although I don't know if Gnome on Wayland on FreeBSD works yet. This allows the other Unix to mostly look like Linux, desktop-wise. As an additional benefit, it allows the other Unix to also use other, more minimal Wayland compositors (ie, window managers) that people may like, such as Sway (the one everyone mentions).

In another future, other Unixes don't attempt to chase Linux by implementing APIs to get Wayland and Gnome and so on to run, and instead stick with X. As desktops, major toolkits, and applications drop support for X or break working on it through lack of use and lack of caring, these Unixes are likely to increasingly be left with old-fashioned X environments that are a lot more 'window manager' than they are 'desktop'. There are people, me included, who would be more or less happy with this state of affairs (in my case, as long as Firefox and a few other applications keep working). I suspect that this is the path that OpenBSD will stick with, and my guess is that anyone using OpenBSD for their desktop or laptop environment will be happy with this.

An unpleasant variant of this future comes about if Firefox and other applications are aggressive about dropping support for X. This would leave X-only Unixes as a backwater, stuck with (at best) old versions of important tools such as web browsers. There are some people who would still be happy with this, but probably not many.

Broadly, I think there is going to be a split between what you could call the Linux desktop (Wayland based with a major desktop environment such as Gnome, even if it's on FreeBSD instead of Linux), perhaps the Wayland desktop (Wayland based with compositor like Sway instead of a full blown desktop environment), and an increasingly limited Unix desktop that over time will find itself having to move from being a desktop environment to being a window manager environment (as the desktop environments stop working well on X).

PS: One big question about the future of the Unix desktop is how many desktop environments will get good Wayland support and then abandon X. Right now, there are a fair number of desktop environments that have little or no Wayland support and a reasonable user base. The existence and popularity of these environments helps drive demand for continued X support in toolkits and so on. Of course, major Linux distributions may throw X-only desktops overboard someday, regardless of usage.


Comments on this page:

There seems to be openbsd support for wayland: https://www.phoronix.com/news/Wayland-1.23-Released

To be honest, the *bsd aren't really usable for a desktop use anyway the last time I have tried it and I think it hasn't changed much. OpenBSD doesn't even support filesystem journaling and trim. FreeBSD doesn't have support for current wifi standards and I had trouble even getting it to start X. I didn't tried NetBSD but I doubt it is any better. Realistically the only option left for running unix-like operaring system is Linux if one doesn't want to buy Apple hardware.

By morton at 2024-07-27 12:34:54:

Wayland is unapologetically not cross-platform the way X was

I'm not really sure what to make of this statement. Wayland is primarily a protocol definition, not a discrete program one can run. And I don't recall much about the protocol that would preclude portability. SCM_RIGHTS might be required; it's mentioned and woefully under-specified in POSIX, but is portable in practice.

If I run "nm" on some Wayland libraries, I do see non-standard features such as eventfd and epoll; but those were not present several versions ago, and the source code still has various BSD references. I see nothing relating to D-Bus, systemd, and the like.

I know QNX has a Wayland implementation. The FreeBSD documentation mentions several working Wayland compositors, and doesn't say anything about needing a Linux compatibility layer. I don't know about GNOME; but the G stands for GNU, and only Linux and Hurd are generally used as kernels on GNU systems. I don't know whether BSD people tend to want "desktop environments" anyway.

For an "alternate alternate" future, relevant to the comment by "n", note that there have long been several projects for making Linux drivers (possibly inside an entire Linux kernel) run on non-Linux systems, usually micro-kernels. And of course there was NDISwrapper for running Windows wi-fi drivers on Linux. Something like this could be another way to get graphical environments running on non-Linux systems, with hardware support.

By cks at 2024-07-27 13:11:45:

From quite early on, X was made to run on multiple Unixes and their graphics hardware; the issues involved strongly influenced its protocol design. Wayland started out as a Linux project and there was no attempt to bring it up on other Unixes in order to find out what pain points there were. As far as what Wayland is, for a long time Wayland has been both a protocol and an implementation of that protocol (maybe more than one), because without the implementation the protocol wouldn't have gone anywhere. And as far as I know, no attempt was made to bring up that implementation on non-Linux systems or have their concerns affect the protocol.

(Certainly culturally Wayland has been a Linux thing, or been percieved as that.)

By morton at 2024-07-27 19:16:04:

Debian's "wayland" source package contains just the protocol definitions, documentation, and a few libraries. Is the latter what you mean by "implementation", or do you mean something like Weston? Weston was always meant to be one of many available compositors.

You're right about cultural perceptions, which I think have somewhat mis-represented Wayland. For example, the early perceptions that Wayland required a GPU (Weston did and maybe still does, but the protocol doesn't preclude software composition), couldn't work across a network (someone just had to write the code—which will probably work better than X across the Internet), or that applications would have to draw their own decorations and it would be impossible to switch window managers (compositor-decoration exists now, and someone could write a generic window manager protocol—much as X didn't have ICCCM originally).

I guess display hardware used to differ quite a bit; but, these days, it's pretty homogenous. There's some mapping of scanout engines to physical ports. An active scanout will almost always be of an ARGB framebuffer, and perhaps a YUV or RGB underlay. Maybe scaling and rotation will be possible. Anything extra is pretty much vestigial (palettes, chroma-keying, blitters, hardware cursors, auto-scolling) and not used by graphics frameworks. These frameworks have become equally homogenous in design: clients provide finished buffers rather than asking to draw or blit things, which means that the server isn't exposing any "interesting" capabilities even if it happens to use them for composition.

So, I doubt there would be any significant hardware differences the protocol would need to accept for, even in a world where other Unixes supported hardware that Linux didn't. And I'm not aware of any real Linuxisms in the protocol. In other words, it should just be a bunch of work to port or create a compositor for another Unix; probably not something that requires a lot of collaboration or co-operation ("politics") with those devloping for Linux (as porting an entire desktop environment like GNOME might).

By Sanqui at 2024-07-28 05:35:10:

By the way, it's already possible to run Wayland applications across the network using Waypipe[1]. I use it regularly for development and it's excellent.

[1]: https://gitlab.freedesktop.org/mstoeckl/waypipe

Written on 26 July 2024.
« How I almost set up a recursive syslog server
Backward compatibility, even for settings, has real costs »

Page tools: View Source, View Normal.
Search:
Login: Password:

Last modified: Fri Jul 26 22:40:11 2024
This dinky wiki is brought to you by the Insane Hackers Guild, Python sub-branch.