Hacker News new | ask | show | jobs
by orbital-decay 3 days ago
X forwarding is the complete opposite of that - it's non-semantic, doesn't abstract away styling, heavily relies on bitmaps, and generally a lot noisier than a terminal. It needs to be replaced with something better thought out for GUI remote access to be a viable alternative. Same goes for SPICE (as far as I remember how it works).
3 comments

The X protocol is semantic[1] and when used as originally intended is very fast even on 1990s networks. But GUI toolkits ended up heavily relying on local rendering and shipping bitmaps over the wire, which is why Wayland advocates argued bitmaps are good enough.

It's kinda like the way PostScript evolved into early PDF which evolved into modern PDF, where pages are basically assemblies of prerendered images. The original, semantic aspects are still there, just not used, or rather abused to dumb it down.

[1] At least in the way you mean. Semantic like SVG, which is still literal, just abstract.

I remember running the original Citrix client for Windows over a 14k modem.

It worked remarkably well, the only real nut was the typical “splash page” on launch, which was typically a large bitmap. Those stalled pretty hard, but once you got past that and up and running, apps were quite smooth over the crummy bandwidth.

> It's kinda like the way PostScript evolved into early PDF which evolved into modern PDF, where pages are basically assemblies of prerendered images. The original, semantic aspects are still there, just not used, or rather abused to dumb it down.

that is definitely not the case for any sensible use case. PDF that's just bitmaps is a shitty hard to use one

SVG is also semantic; you can write (and even read!) SVG in a text editor just fine. Not every SVG is semantic though; many of them are just a single <path>.
Yeah, my biggest pain with inkscape. Editing and saving a clear handwritten SVG there meant no more semantic SVG afterwards.
"you can write it in a text editor" is not the definition of "semantic", you can also write PPM bitmaps in a text editor
You can also write AVI videos, there's even a webcam package for emacs.
The X protocol has some semantic drawing primitives, but modern applications rarely use them. Partly because they don't look very good, and partly because it is often easier to draw bitmaps, and the X primitives can't make use of the GPU.
I am pretty sure many primitives are hardware accelerated.
Modern GPUs don't do 2D acceleration, there isn't any hardware to map those primitives to. Layers such as Gallium map the old primitives onto software routines running on the GPU.

Some SoCs such as those from Rockchip and Allwinner do have 2D acceleration provided by their display controllers separate from the GPU but there isn't much software support for them.

I think you meant Glamor, which implements X11 acceleration through OpenGL, replacing hardware-specific DDX drivers; Gallium is the abstraction layer between Mesa drivers and graphics APIs. Don't confuse with Glamo, which was the Neo Freerunner's GPU and had its own DDX driver :)
Time to bring back https://en.wikipedia.org/wiki/Display_PostScript ?

I remember seeing a DPS terminal around 1988 or so. It was pretty.

I’ve not done X forwarding in decades but it definitely was semantic and abstracted styling back when i used it to connect to Solaris boxes over dial up.

Maybe the bitmap problem was an issue with modern DEs? Many of them were likely bitmap-heavy for window chrome anyway.

Modern toolkits are optimized for GL rendering and the shared memory extension. They produce beautiful effects and animations, and give the X server large bitmaps already in VRAM, much like a video player.

Toolkits like Athena back in the day dealt in terms of lines, rectangles, and text strings to be rendered locally, more like, say, HTML does.

The latter approach did work over dialup. The former struggles to be smooth even over 100mbps Ethernet.

You misspelled "useless" as "beautiful"

It still works fine over local lan

Have you actually tried it? Most modern apps and frameworks render to bitmaps on the GPU and pass that over X11 but that isn't the only thing you can do with X11.

And nobody mentioned "semantic". Focus on "semantic" usually turns out to be ivory tower nonsense that impedes progress towards working systems, anyway.

>Focus on "semantic" usually turns out to be ivory tower nonsense that impedes progress towards working systems, anyway.

Valid. But then working systems turn out to be piles of cruft which eventually spins out of control, like it happened with web and X11 and is happening to TUIs for the last decade. When you have terminals playing videos [1] you know it took a wrong turn somewhere.

[1] https://vivido.dev/

There isn't that much cruft in X11 nor in TUIs.

People assume X11 is crufty because Wayland exists, but few actually bothered to learn anything about it.

Video playing in a terminal isn't cruft - it's a hack, which is a different thing.

Well, a terminal playing video does the same as a hardware-accelerated video surface in a GUI, but a lot less efficiently in a roundabout way. It carries all ancient baggage from VT100 and upwards, frozen for decades and not really useful for anything anymore. It only holds everything back at this point, of course it's cruft.

X is the same, it was designed for primitives nobody's really using anymore, and the rest if offloaded to bitmaps which was never the point.