When I am teaching a class, some students have problems following my CLI commands and would like to scroll back to be able to repeat the steps in their own speed. So I'd like to log all my inputs in realtime to an html-file or something similar, which I could server through a webserver. That way, the students could simply go to http://example.com/log#end and would always see the last entries.
I do know the multiuser mode of
screen and have already used it to share sessions. However, I need to disable the write access of students and unfortunately, they are unable to scroll up, if I do so.
I also had a look at
script, but it generates a terrible output, which - even when filtered through
col -bp < logfile >> output.html is unreadable. Also, it does log the output as well, which complicates things and only dumps the logfile in unforeseeable intervals.
.bash_history could be used, but is only dumped to file when the session ends.