Webapp controlling shell

Hello all,

The idea is to have a web interface to a box like raspberry pi or any other linux box where i have to setup all from the interface, Network card, users, accesses , packages and so on, so the question is, Is there a way to use webapp to control a series of bash scripts in order to have all the packages installed and as well have the install status progress showing on the web page ?

I need to create like a custom box linux based where you get it as preinstalled OS and depending on what you want to be and what packages you need you install them via admin interface.

Now i could have that done in perl or php sort of but i prefer not to install a lot of packages if i can doit via a webapp built in XOJO.


Sure, just subclass the Shell class.

I have a WebApp with buttons to call Python Script and return the results via SHELL, so a similar technique could be used to install applications via SHELL. I also have a Status button in the WebApp that shows me whether certain subprocesses (about 7) are running or not. This is much easier than running a Terminal session to the box.

Hello Guys, well that would be the idea as well in my case, i don`t want to give access to shell to the boxes and i would like to make it as easy as possible for the users, so all the basic settings in the interface and then the hard work on the back done in threads , as well notifications once all is done.

Could you please share any sample to have an idea how to doit ? i adapt fast but i need some visual samples.

Thanks again.

It’s worth noting that any shell you create will have the permissions of the user running your web app, so if it’s Apache, that’s all you’ll have access to… and no, it is not a good idea to run your web app as root.

I have a ‘Service Status’ button in my WebApp to show me whether the Helper apps are running (works on Mac/Linux/Win):

Here is a super simple example. I use a shell to put system info into a label on my login dialog so I can see some statistics at a glance.

in the Shown() event handler for the dialog:

dim sh as new Shell
StatusLabel2.Text = sh.Result

How it looks: