Hacker News new | ask | show | jobs
by orbital-decay 8 days ago
Terminal giving you a janky and limited remotely accessible canvas you can abuse to make primitive GUIs doesn't imply that "SSH is a GUI framework".

A lot better solution would be designing a compact, semantic, styling-independent remote access protocol that doesn't need bitmaps (unlike most currently available protocols), and uses good compression for actual pictures/videos. That would make any GUI efficiently usable remotely through an adapter for an existing GUI framework, without extra bloat the browser has.

13 comments

So basically expanding on remote X11/X forwarding?
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).
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.

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.

How about HTML/CSS/JS
HTML started somewhere between semantic and layout oriented; now it is more the latter. CSS is a powerful selector language but it selects... layouts.

JavaScript is a general-purpose language and does none, some or all of the above.

The web’s biggest problem IMO is that it has evolved in the direction of giving content providers more and more control over how that consumption is consumed. I miss the gopher days when content was 100% semantic and layout was 100% a client-side task.

What I would love to see is a semantic-only language that is textual (easy for a human being to type in a text editor) but more structured with extensible semantics. Instead of using | and - to “draw” tables, just express the data and leave it to the renderer to choose the best (or user-preferred) rendering.

Maybe I’ll mock one up.

Ed: spelling “not”—>”now”

What if - I know this is a tall order - instead of arguing about the layers a program should be divided into, we spend time making it easier to write your own program from scratch and then it won't matter if one of them sucks because you can replace it wholesale
The problem is a web browser is exactly that use case. Their whole function is to remotely render a GUI.

We gripe about web design when people start to act more like it's local, but all the things a browser does are essentially "I need a remote GUI" and a lot of effort has gone into that.

They are not and the fact HTML/CSS is NOT designed to be "remote GUI" is precisely the problem web has.

It is document + styling format. It was not designed to do GUIs, It was roundpeg squareholed into being one, and only after throwing copious amount of JS on it it works okay while being okay on design side

Well, it's surely not the most elegant thing ever, but it is so far above anything else in terms of being cross-platform, actually powerful and bandwidth efficient (if one wants it to be) that we should just accept the "costs".

Like you could write a full CAD app, online FPS shooter etc in it.

WebGL + WASM approach seems to be far better at making actually well working UIs (because you can use actual desktop frameworks for it), but that's a bit fat
Nothing beats the accessibility of plain HTML form/buttons. But I do agree that web frameworks can break down at certain things (though to be honest desktop frameworks are in quite a bad shape in general, there are too many of them and most of them fall short of feature completeness, at which point they simply can't be used. It's a very very hard and complex topic, like text rendering, and having n+1 different solutions may not really help it)
"designed for" is always a red herring. The question should be, what does it actually do?
A terminal with an HTML/CSS embedding mode would be interesting.

In the BBS days, there were some attempts to move beyond ANSI escape sequences, like RIPscrip: https://en.wikipedia.org/wiki/Remote_Imaging_Protocol

Once the web took off, all that stuff disappeared...

I made something like that a while ago: https://github.com/breuleux/terminus

I'm currently working on something far better that allows for true interactive widgets over SSH (that does already work), but in my quest for perfection I'm about to rewrite the protocol for the third time, so I don't know if I should share that :P

Problem is the more flexible a contract/protocol/interface is for one side, the less flexible it is for the other.

For example a terminal supports flexible font (but only monospace!) and font size. If it was based on pixels those wouldn't be changeable. Conversely if it didn't have a character grid (like HTML doesn't) it could also support proportional fonts.

it is annoying how poorly web browsers support the local or ssh tunneled application use case though. it would be nice if there was a way to get browsers to work more like X servers, presenting an unix socket that applications (either local or ssh-tunneled) could connect to. Or something along those lines.
I've actually recently shipped something along these lines, now supported on all platforms. It's an SSH client fused with a browser: https://probablymarcus.com/blocks/2026/11/20/ssh-tunneling-h...
Basically wireguard + Apache httpd with cgi-bin or websockets?
the main difference between web UI and a terminal is that a terminal streams instructions. For HTML you usually need a whole program that compiles
Modern web is a terrible abuse of what was originally a document viewer. A web app is not even in the same league with a TUI when it comes to remote access. It needs to be designed specifically to stay as noiseless on the network as a TUI app is by default, and the browser is incredibly janky and bloated, which is not avoidable. Don't worry though, modern TUIs are headed towards the same direction, because people want more and more features in a legacy thing instead of designing one for the purpose.
I can compose a text with barely any network and then press send and it will eventually go through.

I literally have to find stuff like herdr web ui or whole mobile applications to write a longer text (e.g. a prompt) when I'm on patchy networks because the variable latency after each keypress makes it impossible to write on an SSH TUI. So if anything, it's the latter that is a "terrible abuse" of a GUI.

A form get and submit like in the HTML 3 days doesn't really have a lot of noise (if anything SSH TUIs are worse as they operate by sending every keystroke to the server). The bloat is a fair point though.
I mean, one could argue that the web is just a remotely accessible hypertext protocol we've been increasingly abusing to make whatever arbitrary GUIs we want.

I've always wanted a styling-independent protocol, which led me to the Gemini protocol (not the AI) for one, although I find that all such "next-generation" protocols don't see much traction.

I picked SSH as a convenient option that people already use to log into VMs.

nit: CSS is the styling not the HTML :P
It's worth trying. I have thought that you might be able to replace most TUIs, which rely on presentation-oriented ANSI, with a lightweight markup language that includes forms. [1] A form would be interactive while current and become part of a static log once submitted. I guess that's pretty much a block-oriented terminal? [2]

You could use a controlled subset of HTML. It naturally comes to mind. However, an implementor could then embrace, extend, and extinguish your protocol by allowing full HTML.

[1] A language like Markdown/djot or Creole, https://web.archive.org/web/20260000000000*/https://www.wiki....

[2] https://en.wikipedia.org/wiki/Computer_terminal#Block-orient...

It's fun though. I think this is a fun demo of forgotten/overlooked ssh capabilities.
how does hyper gui transfer protocol sound? :)
How it sounds depends on how you pronounce GUI--do juniors say "gooey," or has that passed away with "sequel" and "clee"?
Don't tell me, the correct pronunciation is actually jooey?
What I'm saying is "ess-cue-el" and "see-el-eye" are common now, so maybe "gee-you-eye" is too?
printf "\007";
So something like FreeRDP?
I'd propose we define some kind of hypertext markup language. Probably allowing the app send some default cascading style sheets would not be bad, but we should be able to apply our custom ones over it. Then we find a way to represent our state transfers between the client and server.
It exists. It's called HTTP and HTML.

If you do this, however, you quickly figure out that you're wasting bandwidth and the user's time by forcing a round trip to a far-off server on every button click (hence Javascript), and that the UI looks inconsistent in different browsers (hence CSS), and then, a few years later, you get the status quo.

And then you've reinvented native apps but worse.

The point of design or abstraction is basically to pick out specific interesting points on a multidimensional spectrum. You can't cover a large swath of the spectrum and still have a good design.

Classic HTML forms were an interesting point. They are not the most efficient solution to every problem, but they have known properties which allows more to be said about then (for instance no code execution on the client, and you can "save as" and print). Fully native apps are another. There's very little that can be guaranteed about a native app but it has access to more ways to do things efficiently. By pulling HTML towards native apps, it becomes a jack of both trades, master of none. You can't guarantee many properties about an HTML page and more, you usually can't print one and definitely can't save-as, but it also can't be as efficient as a native app.

Ultimately there's so little actual programming going on now it's automated with AI that larping is filling the time.
>Terminal giving you a janky and limited remotely accessible canvas you can abuse to make primitive GUIs doesn't imply that "SSH is a GUI framework".

Sure it does.

>A lot better solution would be designing a compact, semantic, styling-independent remote access protocol

Sure. But something being a better <thing> doesn't mean something less good is not <thing>.

Well, for one SSH != terminal, and a framework is supposed to be a lot more than just a canvas...
yknow that sounds a lot like "the web"
That better solution is known as plain HTML over HTTPS. The user can write their own styles. The user can prohibit <img>s or selectively allow them.

But yeah the author is probably deliberately conflating between the Terminal which renders and the SSH protocol which just transports streams securely. It makes the title more enticing.

html is ass for actual interactive UIs
The large amount of effort needed for good interactive UIs in the terminal is comparable to that as a webapp.
that if anything is another critique of html/css approach