There was some fiddling required to make sure everyone sees the same thing: dvtm/dtach resize on connect, and that was annoying, like, it would reconfigure to fit the logical terminal width of the terminal emulator in the browser, this was awful. So, I set up a screen session called 'public' and then told ttyd to run `screen -x -r public`. Inside that screen is dtach, which is where I did the actual setup, dtach is running dvtm, and the individual windows in dvtm are all attached to windows in a screen session (except the IRC window, because I already have an IRC window so no need to share that with myself). So the path an individual character takes to get onto the screen is a program produces it, then it goes through screen, then dvtm, then dtach, then screen again, then ttyd, then it bounces through the websocket in the ssh tunnel out to nginx, which sends it to your browser, which uses xterm.js to display it.
There was some fiddling required to make sure everyone sees the same thing: dvtm/dtach resize on connect, and that was annoying, like, it would reconfigure to fit the logical terminal width of the terminal emulator in the browser, this was awful. So, I set up a screen session called 'public' and then told ttyd to run `screen -x -r public`. Inside that screen is dtach, which is where I did the actual setup, dtach is running dvtm, and the individual windows in dvtm are all attached to windows in a screen session (except the IRC window, because I already have an IRC window so no need to share that with myself). So the path an individual character takes to get onto the screen is a program produces it, then it goes through screen, then dvtm, then dtach, then screen again, then ttyd, then it bounces through the websocket in the ssh tunnel out to nginx, which sends it to your browser, which uses xterm.js to display it.