I have developed a django based application which interact with end user using Views and then does its work on underlaying operating system (Linux). The purpose of this system is to give a user friendly interface to linux based system. This task is pretty much accomplished using Django and Python. Now the customer wants to see how linux process these commands in real time.
To give an example to find a file on website view I have textbox where use enter file name and hit a button called search. As a result system may take upto 5 mins and bring back results at the end of execution of find command back to user. Customer is not happy to sit and watch a circling pop up and want to see the linux shell or similar thing on webpage.
==> My question is how can i integrate Linux Shell/terminal in a webpage?
Are there any other alternatives to this problem?? I mean customer wouldn't mind if I can show linux commandline output by refreshing screen everything a new line is send to Shell's stdout.
Please advise. Thanks.
You could have a look at shellinabox or wetty. Both of them are maintained over time.
Quoting from shellinabox:
Shell In A Box implements a web server that can export arbitrary command line tools to a web based terminal emulator. This emulator is accessible to any JavaScript and CSS enabled web browser and does not require any additional browser plugins. The shellinaboxd daemon implements a webserver that listens on the specified port. The web server publishes one or more services that will be displayed in a VT100 emulator implemented as an AJAX web application.
Quoting from wetty
Terminal over HTTP and HTTPS. Wetty is an alternative to ajaxterm/anyterm but much better than them because wetty uses ChromeOS' terminal emulator (hterm) which is a full fledged implementation of terminal emulation written entirely in Javascript. Also it uses websockets instead of Ajax and hence better response time.
Wetty also has a dockerized version.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With