TE
科技回声
首页24小时热榜最新最佳问答展示工作
GitHubTwitter
首页

科技回声

基于 Next.js 构建的科技新闻平台,提供全球科技新闻和讨论内容。

GitHubTwitter

首页

首页最新最佳问答展示工作

资源链接

HackerNews API原版 HackerNewsNext.js

© 2025 科技回声. 版权所有。

Ttyd – Share your terminal over the web

19 点作者 modinfo大约 2 个月前

3 条评论

brw大约 2 个月前
One issue I always run into with browser-based terminal emulators or remote desktop clients is that common keyboard shortcuts like Ctrl-W might be used by the browser instead. Accidentally closing your browser tab and thus losing all your state when you just wanted to remove the previous word is quite annoying. It could be nice if a web app was able &quot;capture&quot; the keyboard somehow so that the browser doesn&#x27;t react to any of its normal shortcuts, which is also commonly done in VM software and remote desktop apps, or I guess similar to input mode in Vim.<p>An open issue here[1] mentions that PWAs can actually define shortcuts that override browser ones which could be a solution. And someone also mentions using extensions that redefine the Ctrl-W shortcut as a workaround. But afaik both of these solutions rely on defining keyboard shortcuts beforehand which doesn&#x27;t seem easy to do, given that you&#x27;d have to somehow define all of the shortcuts possibly used by your shell, editor, or any other terminal apps.<p>[1] <a href="https:&#x2F;&#x2F;github.com&#x2F;tsl0922&#x2F;ttyd&#x2F;issues&#x2F;1181" rel="nofollow">https:&#x2F;&#x2F;github.com&#x2F;tsl0922&#x2F;ttyd&#x2F;issues&#x2F;1181</a>
pcwelder大约 2 个月前
Thanks for sharing this.<p>I got curious and I wondered if a similar thing could be done using pexpect.<p>I went ahead and asked claude to create an MVP. Works pretty well for 20 mins worth of work. Pexpect is a great tool imo.<p>If anyone is curious: <a href="https:&#x2F;&#x2F;github.com&#x2F;rusiaaman&#x2F;pexpect-web" rel="nofollow">https:&#x2F;&#x2F;github.com&#x2F;rusiaaman&#x2F;pexpect-web</a>
aesh2Xa1大约 2 个月前
I think a better description is &quot;ttyd allows you to use your web browser as a terminal emulator.&quot; The sharing part is what struck me. I think of that as multiplexing, and you&#x27;d still need tmux, screen, Zellij, etc.<p>There actually is a tmux fork, tmate, that shares over the Internet (not web&#x2F;HTTP).<p>Anyway, this looks great. They mention OpenWrt, and that&#x27;s exactly what I&#x27;d use it for.
评论 #43458544 未加载