Forums Register Login

Running a shell script in browser automatically

+Pie Number of slices to send: Send
Hi,

I have a linux application. The installer for this application is streamed from the server with a mime type of "application/x-sh".

When the browser receives this streamed data, it displays a message asking the user to
1. select a program to open with and displayes a browse button or
2. save it to disk.

I want to change this behavior, so that the user is presented with an option to open with "sh" automatically. The user should not be made to click the browse button and than select /bin/sh.

It would be even better if the browser runs this streamed data automatically with the /bin/sh program.

This behavior can be configured from the browser (setting the behavior for .sh file types). But I do not have any control over the user's browser settings.

Is there a way to enforce the desired behavior.

I will appreciate any help/suggestions on it.

Thanks,
Basu.
+Pie Number of slices to send: Send
If it would be possible, we would get the big virus-invasion in linux.

I'm glad, it's not possible.
+Pie Number of slices to send: Send
I agree, if the script is executed automatically without the user knowing it, it would be be a big problem.

I am looking for a behavior, which is similar to what happens when an user downloads an executable on Windows. The user should see a pop up displaying an option of opening the script with "sh". The user can choose open the file or save it to the disk.

Any thoughts on how to enforce this behavior.

Thanks in advance,
Basu.
+Pie Number of slices to send: Send
 

Originally posted by Stefan Wagner:
If it would be possible, we would get the big virus-invasion in linux.

I'm glad, it's not possible.



Actually, unless the browser forbids it, it is possible. All that's required is that the MIME definitions for ".sh" files be set to run rather than save, as Basudev notes.

Firefox does support download/run-with option dialogs for things like ZIP files, so there's probably a MIME preference for that, however, it's at the user's control, not the webservers and thank goodness that's so or we would get the "big virus-invasion".

Even if the option were available, however, I'd not want it. Windows users are notorious for clicking the "OK" button, and despite the elitist attitudes of some regarding Unix, I'd not want to wager that a non-geek Unix User is going to be any more discerning that an non-geek Windows user.
I claim this furniture in the name of The Ottoman Empire! You can keep this tiny ad:
a bit of art, as a gift, that will fit in a stocking
https://gardener-gift.com


reply
reply
This thread has been viewed 1316 times.
Similar Threads
configuring editplus
File Chooser Dialog box
Applet for Mass File Upload
Outlook Express
focus
More...

All times above are in ranch (not your local) time.
The current ranch time is
Mar 28, 2024 07:15:21.