Welcome to the Linux Foundation Forum!

Web browser instead of xterm

Sławomir Lach
Sławomir Lach Posts: 27
edited January 2017 in Software Development
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.


Upcoming Training