Eternal Terminal
eternalterminal.dev
eternalterminal.dev
RejoinableTCP was a project that I started and abandoned in 11/18/16. RejoinableTCP was supposed to be a remote shell that automatically reconnects without interrupting the session. It was supposed to be resumable like mosh but with the user experience of ssh. I never started it, because:
1. Unix sockets, public-key encryption, and how TCP actually works are the stuff of eldritch nightmares.
2. No one would switch from ssh just to save a few minutes each day. No one would switch from mosh just to get OS scrollbars
3. I wasn't living up to my expectations in my day-job, and it was taking all of my time. There was no way that I would work on something new.
I created an empty folder and gave up on the same day. The next day, after using mosh for a few hours, I decided:
1. I would give myself three weeks to learn these things before truly giving up.
2. Even if no one else used it, I'd use it.
3. I'd keep a weekly log of time spent and economize that time.
4. RejoinableTCP was not a good name.
So on 11/19/16 Eternal Terminal was born, and three years later, here we are. Somewhere out there, there is some engineer today who has an idea in the same state that I was with Eternal Terminal three years ago. This post is for you:
1. You can prototype anything in three weeks if you put your heart in it.
2. Look around: all the engineers around you felt that same Calling, when you are building something amazing, time becomes fluid and things just flow. We may all come from different places and backgrounds, but that shared experience unites us. If you see a way to make this place better for you, it will probably make it better for others as well.
3. If you love the job you do and the place you work, you can find a way through almost any situation. The entire company is rigged in your favor.
actually i understood a lot from this name, but i get it
I think it's a great lesson for hobbyists: don't worry about perfection. Just POC something and if you're still passionate about it after 3 weeks you can always go back and tidy stuff up.
BOOM! "Eternal Terminal" the name of the project
But what is-- "H2: Remote terminal for the busy and impatient"!
In a sentence or two? "Eternal Terminal (ET) is a remote shell that automatically reconnects without interrupting the session. Learn how to install and use it here."
Oh sweet, now I know what this is. But I'm a power user, can't you also just do this in bash using-- "Here are alternative approaches along with explanations of why we're better"
Cool stuff, is this a new thing or-- "Here's our paginated version history with DATES! BEAUTIFUL WONDERFUL RELEASE DATES so you can see quickly that this project is at least a couple years old."
Sure sure, but what if someone on HN had just linked to the most recent release notes? "Let your eye and your mouse cursor drift naturally to the upper left hand corner, where the name of the project shows up and links to the landing page you just spent 5 minutes gushing about."
Bravo.
Back to Mosh: If it supports scrolling, how does that work? Is there also a prediction engine like in Mosh? What about ncurses apps? I skimmed briefly through the "how it works" page now, and it seems it also uses TCP instead of UDP. Shouldn't UDP be a better protocol for such a tool (also, that's what Mosh uses)? That page also does not say anything about how the prediction works (which is important in Mosh for the low latency), or whether it even does that (or how else could it have low latency)?
mosh: Mosh is a popular alternative to ET. While mosh provides the same core funtionality as ET, it does not support native scrolling nor tmux control mode (tmux -CC).
So if a program suddenly outputs a massive number of lines, mosh will discard the beginning and only send you the visible end of the output. ET will send you everything - which might bog down slow connections, but provides natural scrollback.
Different tradeoffs.
Act like mosh but use spare time/capacity to send the historical buffer too.
That way you get the best of both worlds.
I suspect the market does not lie though, and if you are pedaling broken stuff t to middle-managers, it's best to not explain a damn thing.
tmux control mode is this: http://man7.org/linux/man-pages/man1/tmux.1.html#CONTROL_MOD... It allows e.g. native tiling in ITerm.
In mosh you can’t scroll backwards, due to how the implementation of mosh is made.
See https://github.com/mobile-shell/mosh/issues/774 and https://github.com/mobile-shell/mosh/issues/122
This has annoyed me for a long time so I am definitely going to give ET a shot.
As for the stuff about tmux I don’t know since I don’t use tmux.
If you try to scroll back in your terminal locally (literally scroll up with a mouse/trackpad), it will scroll up your local terminal instead of scrolling up in the remote view. So your scrollback is literally capped at the vertical height of your local terminal window.
This is super annoying if you want to see long output of a previous command or even see what the output was of the command you ran five minutes ago.
ET solves this by basically doing ssh under the hood. So you have real scrollback by default. It's REALLY nice and is one of the primary reasons I use ET.
---
As far as tmux control mode, in essence, it allows you to control tmux via your native terminal commands. On iTerm for example, you can use the key command to vertically split the (iTerm) terminal and tmux will actually hijack that command it do it in tmux. So you can use your native terminal multiplexing commands instead of the tmux key commands.
I only know of iTerm 2 that supports this functionality, just as a heads up.
https://gitlab.com/gnachman/iterm2/wikis/tmux-Integration-Be...
https://fuzzyblog.io/blog/aws/2019/11/26/using-eternal-termi...
And this is how you create useful software. Looking for something to work? Try solving a problem you have. This is a so basic feature and so useful too.
https://medium.com/@grassfedcode/what-could-be-better-than-s...
The answer so far is that it does require you to install ET on the server too, along with the client. And then I searched github for "multiplex" thinking maybe it uses TCP multiplexing. And found a branch named "multiplex". Then I realized the Linux feature I was thinking of is actually called TCP Multipath, searched for it and no go. So I can only say that it _seems_ that it is _not_ using TCP Multipath for maintaining the connection over multiple connection drops.
Would love a more technical "How" here.
NICE. I love Mosh but have always ALWAYS hated how it messes up native scrolling.
Like pacman [0], which you can use on systems like Ubuntu and Debian via pacapt [1]
[0] https://www.archlinux.org/packages/community/x86_64/mosh/
[1] https://www.ostechnix.com/use-archlinuxs-pacman-package-mana...
Absolutely. Just today I logged in on some server and started a tmux session to learn that copypasting with mouse didn't work. After googling how to solve this I noticed that scrollback with mousehweel also didn't work. Then I remembered that I did solve that some time ago but never was satisfied with it because the scroll speed/differential was so low.
Mouse and scrollback and clipboard are some of the more complicated areas of terminal emulators and ones where applications like tmux have the least power so they will always have the potential to be a bit fiddly.
I wasn't planning on sharing my project on HN until I've written up more documentation, but I'm actually working on exactly this problem.
https://github.com/aaronjanse/i3-tmux
So far I've got i3-like controls, resizing & scrolling terminal splits with the mouse, and better color support than tmux.
My current roadblock has been lack of motivation, but if *anyone& on HN finds this interesting (or even just files a bug report), I'd be motivated to reignite my work on the project.
I honestly don't remember the exact details, and maybe it's now fixed.
If you are focused on better controls, our work may be complementary. Would you like to join forces on a high quality fork? A few things concern me with tmux currently.
Please read the following links and tell me whether you share these concerns: https://github.com/tmux/tmux/issues/1019#issuecomment-318284... https://github.com/tmux/tmux/issues/1502#issuecomment-429710... https://github.com/tmux/tmux/issues/44#issuecomment-11975530... https://github.com/tmux/tmux/issues/1391#issuecomment-403267... Please tell me more about your color support issues, and check https://github.com/csdvrx/sixel-testsuite to see if you can diagnose them more precisely
This is exactly what I'm doing!
> Would you like to join forces on a high quality fork? A few things concern me with tmux currently.
I would absolutely love to work together. Please contact the email in my github profile (@aaronjanse).
I'd be happy to state my feelings on each of those issues, but it seems like you have done more research than I have.
Would you mind including some of your thoughts in the email you send me?
So I decide to work a little more on my fork on https://github.com/csdvrx/sixel-tmux
You can see how it handles SGR attributes (bold, italic, underline) and also sixels. I love sixels!
Also...the podcast is more than eight years old!
You can also use eshell or even just shell (if you're not into lisp) within emacs once you are on the remote machine to execute bash commands, with scrolling.
I think that's what is being referred to, but I'm no expert.
I had no idea Mosh did not support tmux control mode. I was hoping to eventually use Mosh more, but not any more.
Glad to see Eternal Terminal works with FreeBSD too.
Just installed it on my server. Package doesn't include any rc.d service file though. And I am fairly certain that unlike mosh, the Eternal Terminal etserver needs to run as a service, seeing as that is what they do on Linux and on macOS.
I'm gonna open an issue about it on their issue tracker.
Issue: https://github.com/MisterTea/EternalTerminal/issues/253
PR: https://github.com/MisterTea/EternalTerminal/pull/255
Note that the version in FreeBSD ports was a bit out of date and they changed the command-line flags between then and now so I built the most recent version from source and had to make a small change in CMakeLists.txt in order to be able to build it, for which I submitted a separate PR.
CMakeLists.txt PR: https://github.com/MisterTea/EternalTerminal/pull/254
If these two PRs are accepted and a new version of Eternal Terminal is released with these changes included then I can ask the FreeBSD package maintainers to update the port and for that rc.d service file to be included in the FreeBSD port and package.
> Ssh is a great remote terminal program, and in fact ET uses ssh to initialize the connection. The big difference between ET and ssh is that an ET session can survive network outages and IP roaming. With ssh, one must kill the ssh session and reconnect after a network outage
Is it normal for remote shells to have telemetry?
I hope you were sincerely asking a dumb question and not attempting to make a low effort joke instead of discussing the project in earnest.
Although in our times it won't even be that surprising if remote shells started phoning home...
You remind me of the main character's wife from Breaking Bad, what's her name, oh yeah Skyler.
Well, tools that you wouldn't expect to phone home like text editors and compilers now do. See VSCode, the .NET Core compiler and even the Windows 10 calculator [0].