Giter Club home page Giter Club logo

Comments (15)

tsl0922 avatar tsl0922 commented on May 18, 2024

This is expected, as well as ssh does. You may use tools like nohup to keep process running in background.

from ttyd.

LoganDark avatar LoganDark commented on May 18, 2024

nohup makes my docker process stay alive after ttyd ends. and then I have to kill it manually, how do I fix this?

from ttyd.

LoganDark avatar LoganDark commented on May 18, 2024

ttyd just kills the process when the browser closes, I want it to stay open after the webpage closes but I still want it to close when I kill ttyd.

from ttyd.

tsl0922 avatar tsl0922 commented on May 18, 2024

Not support, this seems not the use scene of ttyd.

from ttyd.

LoganDark avatar LoganDark commented on May 18, 2024

I mean like where I can visit the webpage at any time and have access to the running process

from ttyd.

tsl0922 avatar tsl0922 commented on May 18, 2024

I want it to stay open after the webpage closes but I still want it to close when I kill ttyd

This is not possible, ttyd always send quit signal to process when client disconnected. if you want to share one terminal with multiple users, you can use a terminal multiplexer like tmux, for example: ttyd tmux new -A -s ttyd vim.

from ttyd.

LoganDark avatar LoganDark commented on May 18, 2024

nope, not what I want. what I want is a session I can always connect to in the browser. i'm not going to be sharing it with others.

sorry if i'm bothering you, but you don't seem to understand what I want

from ttyd.

tsl0922 avatar tsl0922 commented on May 18, 2024

I Understood, but it is not possible for ttyd right now, so I gave you some workarounds.

What you want is something like tmux session managed by ttyd which maps connect to attach, disconnect to detach?

from ttyd.

LoganDark avatar LoganDark commented on May 18, 2024

can't you just add like a --nokill option, something likeDoesn't shut down process on client disconnect?

i'd add that option myself but i have no idea how :/

from ttyd.

tsl0922 avatar tsl0922 commented on May 18, 2024

No. ttyd doesn't store session, if it Doesn't shut down process on client disconnect, that process will be stale, we can't identify which client it belongs to.

from ttyd.

LoganDark avatar LoganDark commented on May 18, 2024

I give up...

from ttyd.

wuestkamp avatar wuestkamp commented on May 18, 2024

Would it be possible to put an (Nginx) proxy in front which always keeps the connection alive and accepts coming and going connections and transfers these to the same session? For the ttyd it would just seem that there is one long-running connection. Anyone got experience with this?

from ttyd.

devopswise avatar devopswise commented on May 18, 2024

I am looking for same functionality. I need to keep the session running and access whenever I need to, using browser. I appreciate if there are any updates or ideas? Many thanks

from ttyd.

dmartin avatar dmartin commented on May 18, 2024

I agree with the maintainer, this feature doesn't really make sense to handle in ttyd. It can be done with tools designed for running persistent sessions:

# start some persistent background terminal session (could also use tmux, Docker, etc)
screen -dmS htop-session htop

# attach to it when users connect to ttyd
ttyd bash -c 'screen -r htop-session'

from ttyd.

devopswise avatar devopswise commented on May 18, 2024

I also agree with the maintainer and many thanks for the solution @dmartin
In case somebody needs it, here I am leaving a link to my image

https://github.com/devopswise/wspacer-basic-workspace

from ttyd.

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.