Live data from Hacker News

Xterm.js

xtermjs.org

31–40 of 67 posts

Re: Xterm.js

#31
post #22
post #5

The demo on the homepage seems to be broken in Safari on macOS. I'm not seeing any text.

This is related to some issue with Safari's new WebGL 2 implementation they shipped recently[1]. Currently we disable the webgl renderer on Safari inside github.dev/codespaces to work around this. [1]: https://github.com/xtermjs/xterm.js/issues/3357

Looks to be the case. Disabling WebGL 2.0 at the browser level fixes the issue.

Re: Xterm.js

#32

Fun fact - xterm.js was originally created by chjj who also wrote the code for Handshake DNS among other things. My favorite is blessed [1]. He’s definitely a super programmer. Thank you for all your contributions to this world @chjj! [1] https://github.com/chjj/blessed

term.js was originally created by Fabrice Bellard -- see the headers of @chjj's term.js file [1]. Bellard wrote term.js since he needed a way to interact with his amazing port [2] of Linux to a web browser. Term.js had a non-open-source license and @chjj spent time a decade ago successfully convincing Bellard to relicense term.js open source (I watched and greatly appreciated this as it happened!). Xterm.js is a very…

Just to clarify, xterm.js is not a Microsoft project and tries to remain neutral, but MS is essentially sponsoring it through my work. Also, a good deal of my time spent working on it particularly early on was for the love/fun of it in my spare time. The WebGL renderer for example was a pure fun personal exercise.

Re: Xterm.js

#33
post #3

"Build terminals in the browser" ... and give your passwords there, and type commands. What can go wrong.

Running in the browser is no more (or less) untrusted than running a dedicated terminal client.

Of course it is. In most cases you do not have any sort of guarantees regarding the browser (which it self usually is more complex piece of software than all your operating system and it's accessories calculated together - difficult to audit - known to collect metrics etc etc). In addition one can sandbox their local terminal pretty effectively - With Tomoyo or some other MAC technology. It's not so bad idea to actually isolate your browser too (with Mandatory Access Control) - It usually has no business for a global view on your filesystem or local network resources.

Re: Xterm.js

#34
post #11

Earlier quoted context omitted.

Running in the browser is no more (or less) untrusted than running a dedicated terminal client.

When was the last case when a malicious website or script could capture content or keystrokes directed at another tab? Really curious, because it seems an obvious attack vector.

2018 at the earliest:

https://en.wikipedia.org/wiki/Spectre_(security_vulnerabilit...

It's not a browser vulnerability per se, but it's still mitigated by having a separate address space.

Re: Xterm.js

#35
post #30
post #28

Earlier quoted context omitted.

I'm an educator and I to teach things like symmetric cryptography. I just used full virtual machines in class to demonstrate ccrypt to encrypt and decrypt files. Would xterm.js be a valid way to implement that kind of exercise to avoid relying on virtual machines? Do you know of any resources that would point me in the right direction for building educational exercises?

xterm.js is only a frontend, you still need to plug it into a backend or write you own. A VM would probably be the way to go.

Thanks. I was curious because the demo on the homepage doesn't appear to be communicating with a backend. (The xterm.js code just seems to interact with https://xtermjs.org/js/demo.js.) So I guess this demo presented an experience that people should expect with xterm.js, but not necessarily the standard implementation.

Re: Xterm.js

#36
post #28
post #23

Hi all, I'm one of the maintainers of xterm.js, open to answer any questions! Here's a little history on the project, some of which is already called out in other comments: - Fabrice Bellard created jslinux[1]. - Christopher Jeffrey (@chjj) forked the terminal component into term.js[2], this eventually became unmaintained. - Paris Kasidiaris (@parisk) forked it into xterm.js for use in SourceLair[3]. - I showed up ar…

I'm an educator and I to teach things like symmetric cryptography. I just used full virtual machines in class to demonstrate ccrypt to encrypt and decrypt files. Would xterm.js be a valid way to implement that kind of exercise to avoid relying on virtual machines? Do you know of any resources that would point me in the right direction for building educational exercises?

(Shameless but relevant example.) On https://CoCalc.com [1], you can create a project and click +New-->Terminal to get an *xerm.js based terminal*, then upload the ccrypt source code (download and upload the tarball from [2]), extract it, and build it in a few seconds via "./configure && make". You can then run it via "src/ccrypt". I'm also an educator, and created CoCalc mainly for teaching (it has course management functionality).

[1] https://cocalc.com/features/linux

[2] http://ccrypt.sourceforge.net/#downloading

Re: Xterm.js

#37
post #35
post #30

Earlier quoted context omitted.

xterm.js is only a frontend, you still need to plug it into a backend or write you own. A VM would probably be the way to go.

Thanks. I was curious because the demo on the homepage doesn't appear to be communicating with a backend. (The xterm.js code just seems to interact with https://xtermjs.org/js/demo.js .) So I guess this demo presented an experience that people should expect with xterm.js, but not necessarily the standard implementation.

You can check out the source for the demo at https://github.com/xtermjs/xtermjs.org/blob/master/js/demo.j..., I've actually started hacking up a more general mechanism for doing this since I've done it a few times but it's not OSS yet.

If you don't need to rely on ccrypt and just want to emulate teh experience of using it, you could have an on rails experience by forking the demo file and adapting the commands part.

Re: Xterm.js

#38
This is a great project. I played with it a few years ago to create a tiled ssh client in Electron as a proof of concept for an idea I had and it was very easy to integrate. It has only gotten better since then with all the love from the Microsoft sponsored commits (it is used in VSCode).

Re: Xterm.js

#39
post #35
post #30

Earlier quoted context omitted.

xterm.js is only a frontend, you still need to plug it into a backend or write you own. A VM would probably be the way to go.

Thanks. I was curious because the demo on the homepage doesn't appear to be communicating with a backend. (The xterm.js code just seems to interact with https://xtermjs.org/js/demo.js .) So I guess this demo presented an experience that people should expect with xterm.js, but not necessarily the standard implementation.

https://blog.stackblitz.com/posts/introducing-webcontainers/

Re: Xterm.js

#40
post #28
post #23

Hi all, I'm one of the maintainers of xterm.js, open to answer any questions! Here's a little history on the project, some of which is already called out in other comments: - Fabrice Bellard created jslinux[1]. - Christopher Jeffrey (@chjj) forked the terminal component into term.js[2], this eventually became unmaintained. - Paris Kasidiaris (@parisk) forked it into xterm.js for use in SourceLair[3]. - I showed up ar…

I'm an educator and I to teach things like symmetric cryptography. I just used full virtual machines in class to demonstrate ccrypt to encrypt and decrypt files. Would xterm.js be a valid way to implement that kind of exercise to avoid relying on virtual machines? Do you know of any resources that would point me in the right direction for building educational exercises?

Hi, I'm Dennis, and I've been working on my own browser based OS for a decade. You can check out the "web native" CLI at https://denix.xyz/shell.os. Replace "shell" with "desk" to get to a friendly gui. Then we can start talking about browser-based encryption techniques. For simple command line utilities, porting via WebAssembly is always a thought. The way Denix works in the CLI is that you have to import command libraries. There is a library called crypto with 2 commands that you can import by typing into the prompt: "import crypto". Entering that command should give you the commands "encrypt" and "decrypt" in your runtime environment. It's been maybe a couple of years since I worked on that stuff, but I just tested "encrypt" and it seemed to be working. A word of caution: Denix is very much a chrome thing.
Post reply on HN