shell script execution on double click
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.........
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.
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?
what happens when you navigate to the location of the script and double-click on it in something like nautilus ?
You want a shortcut on the desktop?
It's up to the user to configure their DE to allow or disallow running scripts by mouse clicks.
Re: shell script execution on double click
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.
|All times are GMT -5. The time now is 03:34 AM.|