Download your favorite Linux distribution at LQ ISO.
Go Back > Forums > Linux Forums > Linux - Newbie
User Name
Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question? If it is not in the man pages or the how-to's this is the place!


  Search this Thread
Old 02-27-2010, 06:30 AM   #1
LQ Newbie
Registered: Feb 2010
Posts: 2

Rep: Reputation: 0
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.........

Old 02-27-2010, 06:36 AM   #2
LQ Guru
Registered: May 2009
Location: Gibraltar, Gibraltar
Distribution: Fedora 20 with Awesome WM
Posts: 6,805
Blog Entries: 1

Rep: Reputation: 1296Reputation: 1296Reputation: 1296Reputation: 1296Reputation: 1296Reputation: 1296Reputation: 1296Reputation: 1296Reputation: 1296
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,

Old 02-27-2010, 06:56 AM   #3
LQ Newbie
Registered: Feb 2010
Posts: 2

Original Poster
Rep: Reputation: 0
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?

Old 02-27-2010, 04:33 PM   #4
LQ Guru
Registered: May 2005
Location: boston, usa
Distribution: fedora-30
Posts: 5,289

Rep: Reputation: 916Reputation: 916Reputation: 916Reputation: 916Reputation: 916Reputation: 916Reputation: 916Reputation: 916
what happens when you navigate to the location of the script and double-click on it in something like nautilus ?
Old 02-27-2010, 04:53 PM   #5
Registered: Sep 2008
Location: The Netherlands
Distribution: Slackware64 current
Posts: 593

Rep: Reputation: 140Reputation: 140
You want a shortcut on the desktop?

Last edited by whizje; 02-27-2010 at 04:58 PM. Reason: enlightment
Old 02-27-2010, 08:29 PM   #6
Registered: Mar 2008
Location: Baltimore Md
Distribution: ubuntu
Posts: 184

Rep: Reputation: 41
It's up to the user to configure their DE to allow or disallow running scripts by mouse clicks.
Old 06-05-2010, 04:08 AM   #7
LQ Newbie
Registered: Jun 2010
Posts: 5

Rep: Reputation: 1
Smile 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.

Iqbal S.


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
executing shell script in terminal directly with a double click kushalkoolwal Programming 15 11-26-2012 03:32 PM
double execution in script yusufs Linux - Newbie 2 01-03-2008 05:25 AM
Can double-click the shell script and choose "Run in Terminal" in Redhat? edwardsiow Programming 2 05-22-2006 09:56 PM
how to execute a shell script in GUI by double click kamesh156 Programming 1 10-18-2005 06:25 AM
How to get Konqueror to execute shell scripts in a new console on double click nitrambass Mandriva 0 06-22-2004 11:38 AM > Forums > Linux Forums > Linux - Newbie

All times are GMT -5. The time now is 04:32 PM.

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