Everything In A Linux Terminal

Here at Hackaday Central, we fancy that we know a little something about Linux. But if you’d tasked us to run any GUI program inside a Linux terminal, we’d have said that wasn’t possible. But, it turns out, you should have asked [mmulet] who put together term.everything.

You might be thinking that of course, you can launch a GUI program from a terminal. Sure. That’s not what this is. Instead, it hijacks the Wayland protocol and renders the graphics as text. Or, if your terminal supports it, as an image. Performance is probably not your goal if you want to do this. As the old saying goes, “It’s not that the dog can sing well; it’s that the dog can sing at all.”

If, like us, you are more interested in how it works, there’s a write up explaining the nuances of the Wayland protocol. The article points out that Wayland doesn’t actually care what you do with the graphical output. In particular, “… you could print out the graphics and give them to a league of crochet grandmas to individually tie together every single pixel into the afghan of legend!” We expect to see this tested at an upcoming hacker conference. Maybe even Supercon.

We generally don’t like Wayland very much. We use a lot of hacks like xdotool and autokey that Wayland doesn’t like. We also think people didn’t understand X11’s network abilities until it was too late. If you think of it as only a video card driver, then you get what you deserve. But we have to admit, we are humbled by term.everything.

4 thoughts on “Everything In A Linux Terminal

  1. I’ve used X11 since 1988 and I know almost all the tricks at this stage (good and bad). X11 > Wayland in many many many ways, but it does have it’s problems (none of which I am going to list!). I say that even though I own a full set of the X11 manuals (~13 books, at on average 1 kg per book).

    Wayland was basically designed as a single user GUI. Long ago I hung about 8-10 cheap diskless clients of a single server and had them network boot and run all their OS and applications over a 10 Mbit/sec half duplex link. Try doing something like that with Wayland today and it would be much much much slower even with 1 Gbit/sec full duplex links, there is just too much bloat. Low networking overhead was not even factored into the design at all.

  2. “you could print out the graphics and give them to a league of crochet grandmas to individually tie together every single pixel into the afghan of legend!”

    I feel like they’re hazy on how crochet works, when it’s something hackers should respect IMO.

  3. Another way to develop a GUI application that can run in a terminal window is the curses library for Python. You can accept keyboard and mouse events and act on them however you like. Which means that at least in principle, you can make a multi-windowed user interface within a terminal window. I used this to produce a user interface that would generate scoreboard and time clock text to use on a live stream. The challenge was that it had to work on institutional MacBooks that were locked down so you couldn’t install an app on them. This sounds like an impossible constraint, BUT you could still run Python.

Leave a Reply

Please be kind and respectful to help make the comments section excellent. (Comment Policy)

This site uses Akismet to reduce spam. Learn how your comment data is processed.