LinuxQuestions.org
Share your knowledge at the LQ Wiki.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Desktop
User Name
Password
Linux - Desktop This forum is for the discussion of all Linux Software used in a desktop context.

Notices

Reply
 
Search this Thread
Old 03-10-2010, 10:37 AM   #1
digilifellc
LQ Newbie
 
Registered: Mar 2010
Location: Newark, NJ
Distribution: Ubuntu, LinuxMint
Posts: 6

Rep: Reputation: 0
How do I execute a bash script from a link on a web page? Is there any way to do this


I want to be able to have a Linux computer go to a web page that I have hosted in cyberspace (nexcess) and by clicking a link, I want it to do one of the following:

1. open gnome-terminal and execute the script located on my server to be run locally (my preferred method)
2. download the script, make it executable, and execute the script locally within gnome-terminal

A hybrid of both techniques is acceptable, but I want the solution to be ultimately a one-button solution. In short, if there is a way to click a http link to open gnome-terminal locally and execute a script, then I can ultimately find a way to do what I really would like to do. Thanks in advance.
 
Old 03-10-2010, 10:45 AM   #2
smoker
Senior Member
 
Registered: Oct 2004
Distribution: Fedora Core 4, 12, 13, 14, 15, 17
Posts: 2,279

Rep: Reputation: 248Reputation: 248Reputation: 248
You don't really want to do that.

If your browser executed scripts from the web then all hell could break loose.

You would need your web server set up to deliver the script in some other form than text.
Then you would have to set your browser to open the script file using a terminal and somehow make it executable on your machine.

That's why we have permissions. To stop things like that happening.

There is no one button solution, the client has ultimate control.

You can use rpms that way, but it's still a bad idea.
 
Old 03-10-2010, 11:12 AM   #3
digilifellc
LQ Newbie
 
Registered: Mar 2010
Location: Newark, NJ
Distribution: Ubuntu, LinuxMint
Posts: 6

Original Poster
Rep: Reputation: 0
The reason why I would like to do this is that I have a growing user base that is new to Linux. I want to soften the learning curve with them so that they can fix common issues quickly and painlessly (such as installing java or flash or adobe acrobat quickly). Still a bad idea?
 
Old 03-10-2010, 11:16 AM   #4
digilifellc
LQ Newbie
 
Registered: Mar 2010
Location: Newark, NJ
Distribution: Ubuntu, LinuxMint
Posts: 6

Original Poster
Rep: Reputation: 0
Maybe a better solution is how could I set up a ready ssh link that I would be able to connect to a client's computer remotely to administer their system without a lot of to-do in setting such a service up? i.e. a one-button solution that will grant ssh access to me from the client's computer? Possibly using dyndns.org as a simple host portal?
 
Old 03-10-2010, 11:22 AM   #5
smoker
Senior Member
 
Registered: Oct 2004
Distribution: Fedora Core 4, 12, 13, 14, 15, 17
Posts: 2,279

Rep: Reputation: 248Reputation: 248Reputation: 248
The problem comes when a malicious person sets up a similar thing and the unsuspecting newbie runs it on their computer.

If you want that kind of thing, then stick to windows. But even windows warns you about running untrusted executables.

You have to trust the person you are getting the script from, and you have to understand what the script is going to do.

You can't soften the learning curve without making the users vulnerable.

The best thing to do, is offer the script as it is, explain to them what it does and how to run it, and leave it at that.

Then it's their choice. And make sure you explain that it's their choice and responsibility.

Besides which, your script is going to be quite complicated to take into account all the variables there are between different computers, even if they are running the same distribution. What if it breaks something ?
 
Old 03-10-2010, 11:24 AM   #6
smoker
Senior Member
 
Registered: Oct 2004
Distribution: Fedora Core 4, 12, 13, 14, 15, 17
Posts: 2,279

Rep: Reputation: 248Reputation: 248Reputation: 248
If you want remote control then look into RDP. But you still should steer clear of "one click" solutions.
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
How do I execute a bash script from a link on a web page? Is there any way to do this digilifellc Linux - Desktop 6 03-11-2011 02:56 AM
Web query to execute commands and output it to a web page ! ashes_sheldon Linux - Newbie 1 05-08-2009 02:45 AM
Problems with a link on a web page Post Modern Programming 2 09-07-2005 03:54 PM
Execute bash commands from web page solomage Linux - Software 1 10-07-2004 10:54 AM
execute command from web page FNC Programming 5 03-06-2003 06:17 PM


All times are GMT -5. The time now is 08:58 AM.

Main Menu
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
identi.ca: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration