Coder Social home page Coder Social logo

Comments (5)

MisterTea avatar MisterTea commented on July 18, 2024

A lot of what you are describing is solved by -x, but I understand that -x limits you to one remote session per user/host pair.

The bigger problem is, how would the server tell the client that information? Mosh can show that information because they are in charge of the terminal (also the reason you lose your scrollbars). ET can't really display anything, but it could run commands when you connect.

from eternalterminal.

egnor avatar egnor commented on July 18, 2024

Yeah, should have mentioned that et -x is mostly isomorphic to killall etterminal. (Now I'm curious to look internally and see if it looks through the process table, or if there's already a whiteboard of running server terminals...)

I was thinking there'd be two channels. One is you'd have some little utility program / subcommand so you could run et ls and it would list sessions on that server, and you could say et kill [session number]. (Maybe that's a bad interface in case you have hostnames ls and kill, but you get the idea.)

The other is that the same data would get sent from server to client at handshake time, and the client would send back a thing saying to kill off any sessions that are definitively dead from that particular client, and all of this would happen before actually starting the connection proper, as a way to deal with the reboot situation automatically.

Finally, there could be a configurable timeout, and any session that hadn't had any contact with its client in that long would get killed off. I'm sure some people won't want any timeout, but I would totally take a day or so for my common use cases.

from eternalterminal.

MisterTea avatar MisterTea commented on July 18, 2024

The configurable timeout sounds pretty simple. The etterminal processes could fetch it from the cfg and kill themselves so no communication is even needed for that one. Happy to review PRs and answer questions.

from eternalterminal.

egnor avatar egnor commented on July 18, 2024

Yep, the timeout would be a good start. Any guidance where you'd go about adding that?

from eternalterminal.

MisterTea avatar MisterTea commented on July 18, 2024

Right here: https://github.com/MisterTea/EternalTerminal/blob/master/src/terminal/UserTerminalHandler.cpp#L71

You would read the cfg file for the timeout (look in the code for .cfg to see how to read the file), then keep the latest time of activity. If, in the while(true), you elapse the timeout without any new activity, break out of the loop and let the terminal process exit.

from eternalterminal.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.