Hacker News new | past | comments | ask | show | jobs | submit login
Eternal Terminal (eternalterminal.dev)
373 points by ofrzeta on Nov 26, 2019 | hide | past | favorite | 101 comments



Hey all, ET developer here. It was an amazing surprise to find ET on the top of HN today. Since it's the three year anniversary of the project, I wanted to share a post that I wrote to my colleagues about it:

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.


This really resonates with me because it was a very similar story with one of my projects (a $SHELL -- a bit like Bash et al). I started it as a short "what if" project and was really surprised at just how much already worked after only 3 weeks.

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.


> RejoinableTCP

actually i understood a lot from this name, but i get it


Thank you for sharing this.


Since I often complain about bad landing pages, I want to take a moment to highlight a really good one. I arrive on the page and:

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.


Actually, I found the homepage (landing page) not so great, and came here to the comments, in the hope to get some more information. Specifically, I use Mosh, and I would like to know, is this the same thing? If yes, how is it different? What are advantages/disadvantages? I would have wanted a more detailed comparison. The name is also a bit confusing; just from the name, I thought this might be a terminal emulator.

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)?


At least one of your questions is answered above the fold of the homepage.

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).


My understanding is: Mosh can't scroll because it doesn't send you the full output of the terminal. It only sends you the current "window" (visible terminal contents) at the current time. ET sends you everything.

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.


I use tmux on the other side of mosh, and _that_ gives me scroll back plus all of the other great things about tmux.


I'd like something cleverer than that.

Act like mosh but use spare time/capacity to send the historical buffer too.

That way you get the best of both worlds.


That would be interesting, but also require support from the terminal emulator. Hence why ET is "native scrolling", I guess?


Oh, so it's actually an 'eternal shell'?


It appears that it just creates encrypted stream connection, ensuring that no data is lost when TCP reconnects. So scrolling/all terminal functions works as with normal SSH. Contrary to Mosh, which emulates its own terminal, synces whole screen so it doesn't clog with runaway output, works with high packet loss and have local typing prediction.


It is actually quite good, even cover alternatives. I think it is great landing page.


Yeah, it's an amazingly creative technique: explain the fuck your thing is, so that people might decide they want it.

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.


But guess who approves purchase orders for business software? Coz it ain't the developers...


As a current mosh user i'm interested but I don't know what "support native scrolling nor tmux control mode" means. Any insight?


mosh by default doesn't support native scrollback. The way mosh is implemented (by default at least) is to just paint the screen locally with the remote "view".

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.


Not being able to scroll was a pain, but nothing that tmux or even output piped to less couldn't solve. It wasn't glorious, but it worked. That said, might be tempted to try ET just because scrolling through long winded outputs are a frequent thing.


Smooth-scrolling back through a command that unexpectedly dumped 500 lines of output, using Alacritty and a big scrolling trackball with acceleration, is pretty glorious.


Awesome thanks! I'm still not sure I understand tmux control mode but I have always used mosh and tmux together so I guess I just never noticed.


This is the best way to use iTerm2's tmux integration mode on a remote host. I wrote some guidance here:

https://gitlab.com/gnachman/iterm2/wikis/tmux-Integration-Be...


Hey George, the wiki is good, as is the whole tmux/iTerm integration. You might want to add a section on reconnecting to ssh agent forwarding from Mac (the whole `eval $(tmux showenv -s SSH_AUTH_SOCK)` thing).


Run some command that outputs more than one page of text and try to scroll back in your terminal emulator. You won't see the remainder of the output, while with ordinary ssh and eternal terminal you will.

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.


I am a current mosh user too.

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.


You can scroll with tmux. Ctrl b and page up/down. Give it a try. Tmux is first thing I install on any machine.


At the risk of incurring self promotion issues (and I really don't understand what qualifies as acceptable self promotion), I didn't feel that this article was all that clear if you are an AWS focused user, so I wrote up all the steps it took to use Eternal Terminal in an OSX / AWS context including an Ansible playbook for configuration.

https://fuzzyblog.io/blog/aws/2019/11/26/using-eternal-termi...


This is a good landing page. Every open source project should have something like this.

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.


I know it's cliche but scratching your own itch really is the way to go. At least you know your market exists, even if you're the only one in it.


For someone wondering "how is this different from screen?/ what problem does it solve?", this article was actually quite nice:

https://medium.com/@grassfedcode/what-could-be-better-than-s...


I asked my self the same question, scanned the linked article and did not find any matches for "screen". So please, could you tell me in short, what the benefit is?


They are a bit orthogonal. When you have a flaky connection, screen will help keeping your stuff alive on the remote host but you still need to reconnect all the time the connection drops. ET and mosh will make it look like your connection never dropped.


Just my guess, but it could be that screen is older and perhaps less used (or at least written about) than tmux.


Thanks! I was wondering the same thing, and this helped.


This article didn't help with screen, but it convinced me that eternal terminal isn't what I want because I often leverage mosh over poor connections and I generally use tmux anyway.


My first question I couldn't find answered easily is "How does it work", e.g. "How does it maintain the connection?

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.


Here it is, I didn't see it hanging out at the top right of the page (#ux test).

https://eternalterminal.dev/howitworks/


> While mosh provides the same core funtionality as ET, it does not support native scrolling

NICE. I love Mosh but have always ALWAYS hated how it messes up native scrolling.


Mosh also refuses to cut a new release, even after almost two and a half years. If you want truecolor, for example, you have to build from source.


Worth noting that most of the "bleeding edge" package managers will do this for you already.

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...


I'm not sure what you mean. The Arch Linux package uses 1.3.2, which is from July 2017.


I'm glad that it has tmux compatibility. Does anyone else have a love hate relationship with tmux? I hate its scrolling and buffer behavior, its almost impossible to get right. Been waiting for a good replacement for tmux to come along for a while now that isn't just i3. Right now I just use tabs in the terminal app most of the time because I dont want to mess with mouse mode, etc.


> Been waiting for a good replacement for tmux to come along for a while now that isn't just i3 > Does anyone else have a love hate relationship with tmux? > I hate its scrolling and buffer behavior, its almost impossible to get right.

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.


Funny, me too! I was adding some features yesterday, a few more today, but I took a few minutes to do screenshots and join the discussion.

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


> If you are focused on better controls, our work may be complementary.

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?


https://github.com/tmux/tmux/issues/1613 is a better reflection of my views on SIXEL, although I am coming round to the idea rather. It is not easy to do properly however, I am interested to see how your code works.


How is the colour support better?


I don't have zsh setup on the OS I'm running currently, but a simple example is that the light-grey autocomplete text from zsh/oh-my-zsh shows up on i3-tmux but not tmux (at least at the time of writing).

I honestly don't remember the exact details, and maybe it's now fixed.


Most likely you are using the wrong TERM so tmux doesn't have the correct information about what colours your terminal supports.


> Does anyone else have a love hate relationship with tmux?

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.


It is easy to change the scroll speed in tmux, although the default is 5 lines at a time which seems like it should be fast enough...

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 do. I have found yesterday and today several strange issues, and a pattern of breaking more things with new features - like deciding to silently drop lines.

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!


I never quite understood the usecase of having tabs inside the terminal emulator. Isn't it nice to have i3 instead?


And when I switch laptops I get to type 'tmux at' in 14 different windows? No thanks.


Jason, the author of this terminal, has a great podcast about programming with a cohost called Programming Throwdown.


Thanks for this, I have problems finding good developer podcasts, and at a quick glance of title + count, this looks promising.

Also...the podcast is more than eight years old!


I use mosh to connect up to a raspberry pi over a slow satellite link. For that, mosh works awesome but I’ve always missed the ability to scroll output when I’m trying to debug something. I’m anxious to give this terminal a try and see how it performs in comparison


Ever since moving to eshell+tramp, all of these persistence tools, however beautifully designed, somehow strike me as solving the wrong problem.


Could you elaborate on this setup?


You can use emacs and tramp to edit files remotely within a local buffer. If you lose connection it doesn't matter, you still have the file, and when you save it auto connects. I often use this with Python and can execute the scripts within emacs with the results being sent back to another buffer.

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.


First, crash emacs 10 or 12 times...


Emacs daemon,emacsclient,shell mode and -nw ? Works ok if the disconnects are infrequent once an hour or so.


How so? What if you don’t use emacs or just want your irssi not dying every time you enter a tunnel?


A downside is that compiling it on CentOS is not so straightforward. I finally succeeded with activating the devtoolset-8 toolchain.


> 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).

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.


> 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.


I created an issue for it and then a PR also.

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.


I had used ET For a few weeks and it worked great except for when it didn't. I can't blame ET for sure, but I had some nasty problems with my ET crashing, having to SSH back in and fix ET, and realizing that it blew up my tmux with it. mosh has not caused this to happen :/


Hmmm, I'll give it a try, though I'm quite happy with mosh. Having to open up only one extra port is nice. I use remote tmux sessions, and so I've never had a scrolling issue before.


Holy shit, it’s mosh with native scrolling? Why haven’t I heard of this?


That's literally the only reason I use it. It's fantastic.


How does this compare to ssh+gnu screen on the remote host?


Directly from the linked page:

> 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


Native scrolling, I think


Does this support lag-free typing over slow connections?


I am probably missing the point here, but how is this different than connecting via ssh and doing tmux attach?


That is explicitly and directly addressed in the article.


Uses one TCP port instead of a UDP port range like mosh makes it easier to use through a firewall. Nice.


It is down for me, I wonder if .dev domain is filtered for me? Anyone has issues accesing this?


If you ping eternalterminal.dev, does it go straight to localhost? If so, it's probably your own computer that's redirecting .dev to localhost.


Oh, that explains everything :) I feel so stupid now, thanks.


Eterminal.


e-Terminal, like it's 1999


I will never give up on writing "e-mail" rather than "email"


Does Eternal Terminal have any telemetry? I guess what I'm asking is, does ET phone home?


Have my vote and never show your face around here again.


Apart from the reference, they seem to like humour, or at least saying it's "for the busy and impacient" while the name actually means "lasts forever" is funny.



slow clap


It doesn't appear so.

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.


> Is it normal for remote shells to have telemetry?

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].

[0]: https://github.com/Microsoft/calculator/issues/148


Yes, on the front page of HN right now is a post about Atom phoning home.

https://news.ycombinator.com/item?id=21642391


Does Microsoft collect the calculations themselves, or metadata related to it's use?


I guess it is the reference to https://en.wikipedia.org/wiki/E.T._the_Extra-Terrestrial

Although in our times it won't even be that surprising if remote shells started phoning home...


This website is for high quality discussion, not low effort pop culture references.


I personally found that to be a high quality joke. I mean, this isn't Reddit, but I wouldn't stick around a website too long if it were genuinely all business, zero fun.


Wow, climb on down buddy. E.T. the movie is even referenced on Eternal Terminal's site. https://eternalterminal.dev/howitworks/#the-eternal-terminal...

You remind me of the main character's wife from Breaking Bad, what's her name, oh yeah Skyler.


Sick pop culture reference!~


And yet, I'm not sure I would call the majority of discussion on this website "high quality".


While this was a joke, I am concerned about terminal utils having (opt-out) telemetry. It seems to have spread recently. For example, Homebrew, .NET core, ...


Maybe he’s not that smart. Maybe he’s like a worker bee who only knows how to push buttons or something




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: