2

I am new in JavaScript, and now I want to run a Linux application in JavaScript and show the result in a web page. It all happens in client without a server. But for security issues or something else, JavaScript as no such interfaces. I know in Windows, it could be achieved with activeX, but how could I achieve this in Linux?

I just wanna make js+browser equal to a client application without the complex GUI design. So there is no server. Any easy way to accomplish it?

4

3 Answers 3

1

Maybe Node-webkit is what you want.

It allows you to easily create a desktop application in javascript and access "low-level" stuff so you can run commands, without the need of an http server.

Sign up to request clarification or add additional context in comments.

1 Comment

It's possible to write Gnome3 applications in JavaScript. It seems OP is targeting Linux already.
-1

Can't be done.

JavaScript cannot interact with the users system in any way.

The only thing you can do is send a request to a server, which executes the command and sends the response back.

1 Comment

Not entirely true. JavaScript interpreter in a Web browser cannot access client system, but no one prevents you from running JavaScript interpreter in other environment, or even stand-alone. Look at node.js, or gnome-shell for example.
-1

With javascript alone can't be done. But you have at least two option to do this using javascript plus other technologies.

The first one is what Jivings sent, using Jquery to sent a post request to a scripting language at the server side.

The second way is to install Node.js. This platform runs on javascript engine, and has all the features you need from the language. After installing it just see this post that explains how to execute a command.

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.