Is there a way to execute a bash command when I click on a text in a browser?The web page is on computer A, the browser is on computer B : I want to execute the code on computer B, e.g hsetroot to change the wallpaper when clicking an image.
Execute a shell command upon a click event in a web page
shell;browser;events
I solve it using a nodeJS server. (not clean/final code but its working)Computer A : (server)function change_wallpaper(image){    var objReq = new XMLHttpRequest();    objReq.open(GET, http://localhost:8888 + ?image= + image, false);    objReq.send(null);}<img src=./img/1.jpeg onclick=change_wallpaper(this.src); /><img src=./img/2.jpeg onclick=change_wallpaper(this.src); />Computer B : (client)file called server.js ans executed with nodejs server.jsvar http = require(http);var sys = require('sys')var exec = require('child_process').exec;var url = require(url);function onRequest(request, response) {    var params = url.parse(request.url,true).query;    function puts(error, stdout, stderr) {sys.puts(stdout)}    exec(/usr/bin/feh --bg-center  + params.image, puts);    response.writeHead(200, {'Content-Type': 'text/plain'});    response.end('Wallpaper');}http.createServer(onRequest).listen(8888);