A
A
Alex2015-01-26 17:18:27
linux
Alex, 2015-01-26 17:18:27

How to execute console command from browser?

Is it possible with Javascript or Chrome API to execute a console command in Ubuntu?
For example, when you click on the execute button
notify-send "Какой-то текст"

Answer the question

In order to leave comments, you need to log in

4 answer(s)
E
Eddy_Em, 2015-01-26
@Kozack

It's easy: we set up a minimal web server and run CGI on the bash.
If desired, you can do without a web server at all.
Naturally, it is better to check the contents of the command first. But it's still a huge hole. Worse than webmin!
PS With the help of greasemonkey, you can pin a floating menu to each site, which will allow you to run CGI from localhost. Let's say get a list of links from an open page and wget them.

A
Andrey Gurtovoy, 2015-01-26
@jt3k

I suggest you look in the list of command line switches for chrome. Suddenly you will find something peter.sh/experiments/chromium-command-line-switches

M
Maxim, 2015-01-26
@1kachan

Without a server language that has rights, it won't work, no way!

M
Mikhail Osher, 2015-01-26
@miraage

Uniform Resource Identifier (URI).

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question