yserver: A modern X11 server written from scratch in Rust
10 points by alemi
10 points by alemi
"whyserver" I'm not sure I see the point of this project. I'd guess it to be a fun / learning project but it seems entirely LLM generated. I'll avoid touching the X11/Wayland debate but I'm just not sure that I can imagine an actual usecase for an intentionally feature-sparse and apparently vibecoded x11 implementation.
The vibecoded part I am not at all keen on, but I for one would rather like a new generation of X. There's very little in Wayland I want -- it seems to have been written by younger people with much better eyesight than me, who care about things I cannot even sense, but who do not care about things that matter a great deal to me.
All the GUIs I like using on xNix run under X. Unity, Xfce, Window Maker, and failing that, Openbox, all are based on X. The ones I'm curious about and would like to see revived, like CDE, ROX, Maxx Interactive, EDE, even XPde, all are X based.
The ones I don't like -- GNOME and modern KDE -- are moving to Wayland. So, for instance, this means that Asahi Linux is unusable to me, as it only supports Wayland, so it only has my two least-favourite desktops, neither of which I could stomach for day-to-day use.
Stuff Wayland does I don't care about because I am unable to see it:
Stuff Wayland can do I want:
That's it. The end.
(Parenthetical note: Xfce 4.20 can do this on X.org, but it seems to do it by setting the lower-DPI display to a lower resolution that delivers the desired scale -- which works, but makes it go fuzzy. This is not ideal: my use case is modern fairly hi-res laptops, which occasionally I plug into lower-res external screens.)
Stuff Wayland can't seem to do that I want:
So far there is one desktop on Wayland I can stomach: COSMIC. It's frankly a bit ugly, and it's so clunky that it irritates me, but what it does, it does well and it's very fast. There are next to no standard keyboard controls, menus are a sad joke, but it's quick and somehow it drives my old non-upgradable non-replaceable ThinkPad onboard nVidia GPUs.
Bring on X12!
Different DPIs on different screens
X can do that too, easily. There's two approaches, one which sucks, the blurry xrandr based scale thing you mention, or you can do it on an application level, similar to how things work on Microsoft Windows. I implemented this myself in my own toolkit and went looking for some config standard to copy and found Qt implemented it as well, so it isn't just me. (sadly, there is no standard config, so me and Qt both do it through kinda hacky environment variables. A better design would be to have a scale factor applied by the window manager, then the application acknowledges it. Then you can do legacy fallbacks and per-window user configuration for easy zooms and stuff. Technically not a challenge at all.)
And best part: it requires zero modifications to the X server, certainly not a whole rewrite and most assuredly not wholescale breaking changes! I don't see any value in any of these projects.
All the GUIs I like using on xNix run under X. Unity, Xfce, Window Maker, and failing that, Openbox, all are based on X.
XFCE has a Wayland roadmap https://wiki.xfce.org/releng/wayland_roadmap, but they state that:
It is not clear yet which Xfce release will target a complete Xfce Wayland transition (or if such a transition will happen at all).
It is to provide a practical X11 server [...] while dropping legacy baggage (multiple screens, [...]).
I'm sorry, but multiple screens is legacy baggage? Can I laugh? Nevermind, I'm rolling on the floor already.
Yes. Modern X uses Xinerama, which lets a single screen span multiple displays. Windows in X11 live in exactly one screen, so multiple screens means Windows can’t span screens. The WM can always emulate the multi-screen model on top of Xinerama, but not vice versa.
Indirect GLX isn’t legacy though. It is necessary for 3d acceleration with remote X11, which remains one of the things that X11 and Microsoft’s proprietary RDP extensions can do well and almost nothing else does at all.
Given the repo seems to imply it supports multiple outputs, I wonder if the concept of an X11 screen is not the same as a monitor? Looking around, it seems X11 screens are entirely separate. Nowadays the common usage is to have a single X11 screen spanning multiple outputs (so you can move windows between them).
In that case calling this legacy baggage feels entirely justifiable.
I wonder if the concept of an X11 screen is not the same as a monitor?
I think you might be right.
X11 supports separate named "screens", called things like :0 and :1, which can be on different cards and support different colour depths -- but they're not part of a single display. You can't just move windows, or even your mouse, from one to another. I tried it decades ago, with the combination of a colour SVGA card and an ISA Hercules card with a mono screen... and the only use I could find for it was, for instance, sending a terminal window to the 2nd "screen" with top running in it. I couldn't easily interact with it.
Honestly, just having a terminal open on the mono display would have been just as useful or maybe more, but I couldn't use DOS-style commands (MODE CO80 or MODE MONO) to flip between graphical and mono/text display for keyboard input.
There is also https://github.com/external-mirrors/phoenix which is an X11 server written in Zig.
Are there others?
That's the one I am keeping my eyes on too. https://git.dec05eba.com/phoenix/ is the primary repo. It's still early days though and it can't display real applications yet.