Top
Best
New

Posted by mmulet 3 days ago

Show HN: Term.everything – Run any GUI app in the terminal(github.com)
I made a built-from scratch Wayland Compositor to display any GUI app* in the terminal! I think there is a lot of unexplored potential in custom Wayland compositors, a lot of really cool things you can embed existing applications into! So, I started with embedding apps into the terminal because that is the easiest input/output (output is just utf-8 and I use the great `chafa` library for that, and I just read from stdin for the input).

If you have any other ideas for cool Wayland compositors, let me know. I purposedly wrote 80% the app in Typescript to appeal to the most developers and attract cool contributions (I do all drawing with the familiar Canvas2D api, so if there is interest, I can also fork this out into a cool Terminal canvas, let me know!)

I have a blog post here about how I did it, but it’s pretty high level and non technical, so please ask if you have any questions.

[How I Did It](<https://github.com/mmulet/term.everything/blob/main/resource...>)

*technically only Wayland apps and x11 apps with Xwayland. But on Linux that’s mostly everything.

1047 points | 142 commentspage 2
fzorb 2 days ago|
I remember seeing something similar named Carbonyl a while back. What a coincidence lol.

https://github.com/fathyb/carbonyl

P.S. This is very cool btw.

patcon 2 days ago||
I truly appreciate the relational thinking and pointing out other projects that might interest ppl who are excited about this :) Having said that, term.everything seems to be much larger in scope than a browser, unless I'm mistaken
mmulet 2 days ago||
That’s right. These other projects are awesome, but they’re attempting something different. It’s apples to oranges.
dodslaser 2 days ago||
Awrit is also similar.

https://github.com/chase/awrit

SJC_Hacker 1 day ago||
This could be useful for testing UI elements of apps ...

Modern UI applications are way too tightly coupled for my liking, and difficult to test especially if you don't practice "separation of concerns", e.g. decoupling the app logic from its presentation.

Haven't looked at the full thing but something like this might allow you to write tests for UI apps without actually having the UI backend...

Forgret 3 days ago||
I wish you success in further development, don't stop!
mmulet 3 days ago|
Thanks!
tracker1 2 days ago||
This is pretty cool, I can see this being useful when I need to run a one-off remotely. Not sure about attaching a running program then detaching again, or mirroring... I wouldn't mind being able to SSH to my desktop and manipulate say the running Discord client, or similar.

Another similar thing that I'd been meaning to look into is the RDP remote apps stuff.

anthk 2 days ago|
Just use a CLI discord client, or fire up an IRC client against some Bitlbee server.
tracker1 2 days ago||
It was an example, not the only use case. 99% of what I want to do remote is just fine over SSH (over Wireguard)... Mostly remote VS Code usage since my desktop is much beefier than my laptop when travelling.
nxobject 1 day ago||
Surprisingly enough, my keyboard is missing the "V", "N", and "C" keys. Thank you for helping me save money by not buying a new keyboard!
kposehn 2 days ago||
Wow. I love this! I actually have a specific, esoteric use for this: VSCode on iPad

Hopefully supports iPadOS one day.

lights0123 2 days ago||
I tend to use https://github.com/coder/code-server#code-server for my remote development needs.
mmulet 2 days ago|||
I know there are ssh clients for iPad. So it should work. I’m going to try it right now!
mmulet 2 days ago||
Behold! running on the iPad! Screen Recording - https://github.com/mmulet/term.everything/blob/main/resource... A video of it on the iPad - https://github.com/mmulet/term.everything/blob/main/resource...

Absolutely no mouse support though, anyone know of an iPad ssh client with mouse support?

(still working on getting vscode to run smoothly)

oarsinsync 2 days ago|||
> anyone know of an iPad ssh client with mouse support

Blink terminal for iOS and iPadOS. Ships with vscode support built in too.

jsjohnst 1 day ago||||
> anyone know of an iPad ssh client with mouse support?

Prompt 3 from Panic

mmulet 1 day ago||
Thanks, I’ll check that out
jamiek88 2 days ago||||
I literally laughed in delight at this.
chamomeal 2 days ago|||
That is absolutely insane lmao
chamomeal 2 days ago||
Oohh wow you’re right, that’s crazy!!
Guestmodinfo 2 days ago||
I like it. I always want to run things in a terminal. Because 1. I used to think that's more secure than X 2. I always seem to get better audio of the videos that I run in tty and my mouse is much smoother in the tty. Yes I can move mouse in tty.

Also someone mentioned a cool project like carbonyl. They also mentioned brow.sh which I have heard but they described it in detail so that's another plus when term.everything kind of projects come they drag other cool projects to he foreground

Point 1 of mine may be pure superstition.

How term.everything works on tty I don't know maybe it will be horriblebecause of the resolution thing but still it's a nice direction.

IshKebab 2 days ago||
I started working on this with the Kitty image protocol, but unfortunately that protocol is really unsuited to this sort of thing. Performance will be awful.

The protocol is sort of:

1. I'd like you to display this PNG. Here's the data: ...

2. Ok I've got the data.

3. Ok now display it at this position.

4. Ok now remove it from the screen.

We're talking motion-PNG here. Just think about how awful that is.

I wish someone would add some kind of AV1-over-terminal protocol. That would be actually useful.

The other thing I was going to try was a custom GUI that used normal terminal text for the text of widgets, but Kitty images for the rest. It's quite a hard problem though.

f33d5173 2 days ago||
What you're describing is a graphical shell. If you want it over the network, we have a protocol for that, it's called X. Misusing a terminal for this is fundamentally pointless.
IshKebab 2 days ago||
Nope. X is too slow to be useful except on local networks, and alternatives like FreeNX or xpra are difficulty and janky to set up. Also X is dying so you really mean something like waypipe or worse (which also jankily failed to run some external command when I last tried it).

But I don't want that anyway. I want something graphical that's actually integrated into the terminal.

ranger_danger 2 days ago||
https://www.youtube.com/watch?v=dcjkezf1ARY
IshKebab 1 day ago||
Probably not running over a network. Also I'm not seeing anything GUI-like.
ranger_danger 1 day ago||
How about this then: https://github.com/saitoha/libsixel
IshKebab 1 day ago||
Sixels are hilariously inefficient. Think "motion xpm".
ranger_danger 1 day ago||
But it's running over a network. I'm not sure what you're asking for otherwise.
ugh123 2 days ago|
This could be used on build machines I own where I occasionally need to interact with the desktop and/or browser on the machine and vnc or other desktop sharing is impractical or exposes security issues.
More comments...