0

I have a script called xyz.sh which uses zenity.which when executed gives the users a selection menu.issue is this is one of our team mate /home/dir which is nfs based. usally we run the path/xyz.sh from terminal.it gets executed. What i was trying to make this as a url and which when called by the user should run the script and pops the selection menu.

example : http://abc.com/xyz which should execute the xyz.sh on user remote machine. not on server.

i don't mind if it is in python or in cgi/php.


Update: Thanks for sharing the link.I have tried and created protocol handler in firefox. As mentioned the below.

First open about:config and then I have created a external protocol. network.protocol-handler.external.app.xyz.sh and in the string I have provided the path of my script /home/xyz/xyz.sh

But, when I call this from the browser xyz: it is again giving me error as "firefox does know how to open this address. Because protocol is not associated with any programme".

Please help me in this. Thanks in advance.

eeerahul
  • 1,629
  • 4
  • 27
  • 38
user1393251
  • 179
  • 1
  • 1
  • 3

1 Answers1

1

It is not possible to run an arbitrary script on a visitors computer (for obvious reasons).

The best approach is probably to tell the user to install some software, which registers a custom protocol in the browser, so that you can direct the user to something like

pythonexec://abc.com/xyz

How to do this is explained in other SO posts such as this one:

Community
  • 1
  • 1
aioobe
  • 413,195
  • 112
  • 811
  • 826