A message for Linux.com registered users: We are in the process of making changes to the Linux forums. From Monday, 8/13/18 at 6:00 PM PT to Tuesday, 8/14/18 at 4:00 PM PT, you will be unable to access the forums. They will re-launch as soon as possible on Tuesday, 8/14/18 with new features and improved functionality. Thank you for your patience and stay tuned for the new improved forums.
Web browser instead of xterm
I have got an idea to replace terminal emulators with modern web browser. It give possibility to use rich formatting(via html/css), forms(html), changeable ui(via EcmaScript), etc. I have one question - which escape sequence could I use to switch to/from html mode?
The web browser would set BROWSER_ID environment variable, so programs could detect it is running in browser, When program checks this env, it could send special escape sequence to switch to html mode and add - for example - table, some images(like progress bars) to output. It could also sends Ecma Scripts command on some file descriptor, so program can modify web page it produces.
Programs could use links to other programs, with parameters, of course. Imagine ls adds links to each directory and this link points to ls with path to given directory.
Web browser could give possibility to select output of command and click send as input to command, to run new command with given input.
Possibilities are many. Is someone interested/can help?
What about security? First problem is when root is run browser and command as specified, unprivileged user. In this case, program could read each file, using for example image tag. Solution would be simple - don't run pages as local page, but remote page, so each access to resources must be accepted by user of web browser.