Welcome to Linux Forums! With a comprehensive Linux Forum, information on various types of Linux software and many Linux Reviews articles, we have all the knowledge you need a click away, or accessible via our knowledgeable members.
Find the answer to your Linux question:
New to Linux Forums? Register here for free!
    Linux Forums > Your Distro > Knoppix Help Forum > How to execute a shell script by clicking on it?

Forgot Password?
 Knoppix Help Forum   For all discussions about Knoppix, the Linux "Live CD" that lets you run Linux without needing to install on your hard drive.

Site Navigation
Linux Articles
Linux Forums
Linux Downloads
Linux Hosting
Free Magazines
Job Board
IRC Chat
RSS Feeds


Linux Forum Topics
Linux Forums
Your Distro
Linux Resources
GNU Linux Zone
The Community
Closed Thread
 
Thread Tools Display Modes
Old 04-05-2007   #1 (permalink)
Just Joined!
 
Join Date: Apr 2007
Location: Australia
Posts: 4
Unhappy How to execute a shell script by clicking on it?

Hi guys,

I m a newbie at Linux and was wondering how I can execute a shell script without using the command line. I made a shell script mdla.sh the contents as follows:

java -jar helloworld.jar prop.conf

it runs fine by me typing:

./mdla.sh

but when i click or double click on it nothing happens and I have full permissions on that file.

cheers
foo
foo1234 is offline  


Old 04-05-2007   #2 (permalink)
Linux Newbie
 
objuan's Avatar
 
Join Date: Jul 2006
Location: california
Posts: 218
Hi
to execute the file ./mdla.sh from a file manager like konueror or what every your using the file permissions need to be correct
755 will execute the program this mean rwx-rx-rx to change the permissions from a command line as root type chmod 755 mdla.sh
objuan is offline  
Old 04-06-2007   #3 (permalink)
Just Joined!
 
Join Date: Apr 2007
Location: Australia
Posts: 4
I ready cmod the file to have 777 permissions but still no gd
foo1234 is offline  
Old 04-06-2007   #4 (permalink)
Linux User
 
peteh's Avatar
 
Join Date: Oct 2006
Location: UK
Posts: 291
Quote:
Originally Posted by foo1234
Hi guys,

java -jar helloworld.jar prop.conf
What is it supposed to do?
__________________
Pete
peteh is offline  
Old 04-07-2007   #5 (permalink)
Just Joined!
 
Join Date: Apr 2007
Location: Australia
Posts: 4
the shell script will run the helloworld.jar file, while passing in the prop.conf as an argument. the the .jar file and .conf file are in the same directory
foo1234 is offline  
Old 04-07-2007   #6 (permalink)
Linux User
 
peteh's Avatar
 
Join Date: Oct 2006
Location: UK
Posts: 291
Quote:
Originally Posted by foo1234
the shell script will run the helloworld.jar file, while passing in the prop.conf as an argument. the the .jar file and .conf file are in the same directory
I suspect the helloworld.jar file prints "Hello world" and if this is the case it will probably be working when you double-click your file but there's nowhere to print without a console.
__________________
Pete
peteh is offline  
Old 04-10-2007   #7 (permalink)
Just Joined!
 
Join Date: Apr 2007
Location: Australia
Posts: 4
pete: I modified the code to bring up a window and display some text, which still works fine when i execute it in a console, but just does not do anything when it is clicked on the desktop.

I want to have the files of the app (jar file and a conf file) in a directory and have a shell script to execute the app from the desktop, where the user simply needs to click on the shell script on the desktop to execute the app.

Is this possible? or is there any way to get around this to make it happen?

Thanks heaps guys,
foo1234 is offline  
Closed Thread


Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Thread Tools
Display Modes

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 On
HTML code is Off
Trackbacks are Off
Pingbacks are Off
Refbacks are Off

Free Magazines
Run Your Own Web Server Using Linux & Apache - Free 191 Page Preview
Learn about everything you'll need to build and maintain your Linux servers, and to deploy Web applications to them.
subscribe
Open Source Security Myths Dispelled
Dispel the five major myths surrounding Open Source Security and gain the tools necessary to make a truly informed decision for your IT organization
subscribe
InformationWeek
InformationWeek is the only newsweekly you'll need to stay on top of the latest developments in information technology.
subscribe



All times are GMT. The time now is 12:41 PM.






© 2000 - 2009 - All Rights Reserved - Property of  MAS Media

Content Relevant URLs by vBSEO 3.3.0 RC2