LinuxQuestions.org
Support LQ: Use code LQ3 and save $3 on Domain Registration
Go Back   LinuxQuestions.org > Forums > Non-*NIX Forums > Programming
User Name
Password
Programming This forum is for all programming questions.
The question does not have to be directly related to Linux and any language is fair game.

Notices

Reply
 
Search this Thread
Old 05-22-2006, 04:45 AM   #1
edwardsiow
LQ Newbie
 
Registered: Jan 2006
Posts: 11

Rep: Reputation: 0
Can double-click the shell script and choose "Run in Terminal" in Redhat?


Hi,

i fail to run a shell script by double-clicking on it and select "Run in Terminal".

but i success to run the shell script if i open the terminal, go to the location where it put and run the script manually.

can i know why? how to make my shell script can run well by double-clicking on it.

thanks a lot..
 
Old 05-22-2006, 05:08 AM   #2
nhydra
Member
 
Registered: May 2006
Distribution: Fedora Core, FreeSpire, PC-BSD, NetBSD
Posts: 96

Rep: Reputation: 15
I am not sure but may be the reason for that is KDE/GNOME files associations. I have installed Slack and it execute all my shell scripts when i click on it. Some other distributions don't do that.
And another thing, the shell script should have .sh extension. It is for that to be recognized.
 
Old 05-22-2006, 08:56 PM   #3
edwardsiow
LQ Newbie
 
Registered: Jan 2006
Posts: 11

Original Poster
Rep: Reputation: 0
Quote:
Originally Posted by nhydra
I am not sure but may be the reason for that is KDE/GNOME files associations. I have installed Slack and it execute all my shell scripts when i click on it. Some other distributions don't do that.
And another thing, the shell script should have .sh extension. It is for that to be recognized.
Thanks for your reply..

i have changed the shell script extension to .sh but still can't work.

Here is my shell script. The function of this shell script is to copy all the files in the CD-ROM into desktop.

Quote:
#!/bin/bash
#File copy with progress indicators

mkdir ~/.gnome-desktop/MathsF5MyCD

echo "Preparing to copy"
cp -v -r ./Data ~/.gnome-desktop/MathsF5MyCD
cp -v -r ./Fonts ~/.gnome-desktop/MathsF5MyCD
cp -v -r ./Plugin ~/.gnome-desktop/MathsF5MyCD
cp -v -r ./Xtras ~/.gnome-desktop/MathsF5MyCD
cp -v ./mathsf5.exe ~/.gnome-desktop/MathsF5MyCD
cp -v ./Linux_Run ~/.gnome-desktop/MathsF5MyCD
cp -v ./Linux_Setup ~/.gnome-desktop/MathsF5MyCD
cp -v ./Linux_Wine.rpm ~/.gnome-desktop/MathsF5MyCD
cp -v ./Linux_install_help.txt ~/.gnome-desktop/MathsF5MyCD
cp -v ./fontmap.txt ~/.gnome-desktop/MathsF5MyCD

echo "finish copy"
when i run in terminal manually, it works. but when i double click the shell script, it fails to run.

please help me..thanks
 
  


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
executing shell script in terminal directly with a double click kushalkoolwal Programming 15 11-26-2012 02:32 PM
Shell Script: Find "Word" Run "Command" granatica Linux - Software 5 07-25-2007 07:42 AM
k3b: To choose "normal" or "clone" copying grautu Linux - Software 1 01-09-2006 06:43 PM
how to execute a shell script in GUI by double click kamesh156 Programming 1 10-18-2005 05:25 AM
Right-click "Terminal here" menu item....? dangerousdave Linux - Software 7 08-26-2005 02:27 AM


All times are GMT -5. The time now is 05:38 PM.

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