LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Newbie (http://www.linuxquestions.org/questions/linux-newbie-8/)
-   -   shell script execution on double click (http://www.linuxquestions.org/questions/linux-newbie-8/shell-script-execution-on-double-click-791927/)

havejeet 02-27-2010 05:30 AM

shell script execution on double click
 
Hi there,

I could run the script from terminal. My script invokes some installation and works fine. But my wish is that end-user should double click the sh script and it should run.
But how? I got few links - but none was of was quite helpful.........

thanks
jeet

EricTRA 02-27-2010 05:36 AM

Hello and welcome to LinuxQuestions,

Please specify what Linux distro and version you're using, and also which DE/WM (Gnome, KDE, ...).

That information is needed in order to give you an answer to your question.

Kind regards,

Eric

havejeet 02-27-2010 05:56 AM

Well, I am using

Red Hat Linux 3.2.2-5 and Genome environment,

however this arises another question - what if my users dont have same environment?

Thanks
Jeet

schneidz 02-27-2010 03:33 PM

what happens when you navigate to the location of the script and double-click on it in something like nautilus ?

whizje 02-27-2010 03:53 PM

You want a shortcut on the desktop?

lwasserm 02-27-2010 07:29 PM

It's up to the user to configure their DE to allow or disallow running scripts by mouse clicks.

iqbal.shirol 06-05-2010 03:08 AM

Re: shell script execution on double click
 
Hey All,

You can run the shell script by a double-click on it, by following the below steps:

> Create the script and save it in a file.
> Right click on that file.
> Goto 'Open With'
> Goto 'Open With other application
> You can find 'Use a custom command' at the bottom. Click on that.
> Click on 'Browse'
> Select 'gnome-terminal' from the files in the /usr/bin/
> Click on 'Add'
> Then click on 'Close'

Now whenever you double click on that file it will run in the terminal.
And if you want to edit that file, open it with vi editor or right click and select open with any other editor.

Cheers,
Iqbal S.


All times are GMT -5. The time now is 07:50 AM.