Running shell scripts from command


 
Thread Tools Search this Thread
Top Forums Shell Programming and Scripting Running shell scripts from command
# 1  
Old 05-08-2010
Running shell scripts from command

I have written a few shellscripts to run a videogame (starcraft) at different patched versions. For example bw113 runs the 1.13 version of the game.

These works perfectly when I run them from command line (./bw113). However I cannot get it to work via mouseclick.

Some Information:
- I have tried 'chmod 755 bw113'
- Ubuntu 8.04.4 LTS \n \l
# 2  
Old 05-08-2010
Shell scripts are specifically for command line... (no mouse...)
# 3  
Old 05-08-2010
Add the options in your menu Smilie
# 4  
Old 05-08-2010
Ubuntu? I guess you're running GNOME? If so, you could add a launcher to your panel. Right click -> add new element -> launcher -> click on the browse button next to the "Command:" entry -> browse to the directory which contains your script and select the script -> Open -> check the "Open in terminal" checkbox -> OK; Now you should be able to run your script with one click, namely with clicking on the new created launcher button on your panel.
# 5  
Old 05-08-2010
Quote:
Originally Posted by lordsloth
I have written a few shellscripts to run a videogame (starcraft) at different patched versions. For example bw113 runs the 1.13 version of the game.

These works perfectly when I run them from command line (./bw113). However I cannot get it to work via mouseclick.

Some Information:
- I have tried 'chmod 755 bw113'
- Ubuntu 8.04.4 LTS \n \l
How did you run the script via mouse? When double click on the script, there should be a dialog asking you if you want to Run in terminal, Display, Cancel or Run. Run or Run in terminal both works just fine for me. Or you can create launcher as instructed by pseudocoder.

D.
# 6  
Old 05-09-2010
I have figured out what was going wrong. Apparently when running a script this way in Dolphin (KDE) it always uses home as the default directory, and not the directory the script is in. I was unaware of this.

So the problem wasnt that it wasnt running on click, merely that the relative filepaths in the script were wrong and as a consequence the script wasnt doing anything except generating some file not found errors. Having no terminal output however, this was not immediatly apparent. Once that was fixed it all worked fine.

Thanks for all the replies though.

-closed
Login or Register to Ask a Question

Previous Thread | Next Thread

10 More Discussions You Might Find Interesting

1. Shell Programming and Scripting

Running Two scripts in a single command line

Hi All, I have two scripts which i want to run in a single command line(or in a single script). And if both the scripts in the main script fail then i want to pass a value to a Application specific utility which will trigger some alert.The value can be anything. Somebody please help.It is... (1 Reply)
Discussion started by: shroh
1 Replies

2. Shell Programming and Scripting

Automatic running of Shell scripts

Hi, I have this problem of merging 2 shell scripts and run it one after the other. For eg: script A runs to give OutputA. This OutputA should become the input of script B which will run to give OuputB. Now this has to happen automatically i.e, script A and script B should run consecutively one... (1 Reply)
Discussion started by: Vindhyaauri
1 Replies

3. Programming

running PLSQL scripts through shell script

I am running the following ealth checks on my server there are two databases in my server . MODEL1 and MODEL2 i connect with the first database as sqlplus model1/password Then i exceute a query select x from table (4 Replies)
Discussion started by: asalman.qazi
4 Replies

4. Shell Programming and Scripting

Running shell scripts automatically without using Batch or at commands

I have been trying to run a unix script which contains many sql statements.I need to run this script every monday morning. I tried to run on command prompt, it works fine. But while I run it via batch or at command., it returns with library module could not be loaded (libcompat.1.o could not be... (3 Replies)
Discussion started by: ritzwan0
3 Replies

5. Shell Programming and Scripting

Running shell scripts from web browser

I am in need of a mechanism to run shell scripts from web browser. Could any one of you guide me as to which technology to choose? I have some scripts which take some arguments. Appreciate you response. (7 Replies)
Discussion started by: corleone
7 Replies

6. Shell Programming and Scripting

Running SQL Scripts from Shell script - Need insight!

I've a script that fetches various values from the database as below: #! /bin/ksh $conn="user/pwd@service_name" `sqlplus -s << $conn EOF1 @xyz.sql @pqr.sql @abc.sql EOF1` The output of the script should generate txt files containing the results from queries which are further... (6 Replies)
Discussion started by: manthasirisha
6 Replies

7. UNIX for Advanced & Expert Users

unix shell scripts for running on solaris

am new to programmming any body suggest , how to execute, shell script interactively and like stream line edit (3 Replies)
Discussion started by: srini_ibmadmin
3 Replies

8. UNIX for Dummies Questions & Answers

running vendor shell scripts

Does anyone run a lot of SH (shell script) commands from vendors. i.e... product installations. And do you edit/change as a rule of thumb? I done a lot of product installs and some tend to think we should edit/change a vendors SH script. I am just looking for your thoughts. Thanks. (1 Reply)
Discussion started by: Javagate
1 Replies

9. UNIX for Dummies Questions & Answers

Running shell scripts on a remote server

Hi - I am running Mac OS X (Terminal) at my current workstation, and I would like to telnet to my local server to run a shell script. The local server is a Solaris machine (don't know the version or the type of Unix being run on it, sorry.) The problem I have is that when I create a #!/bin/sh... (2 Replies)
Discussion started by: pepintheshort
2 Replies

10. UNIX for Dummies Questions & Answers

Cron running shell scripts.

What are the rules of calling shell scripts in cron. How do I go about setting up the correct PATHS that calls a script, which then calls another sub script all of which has to retain the orginal PATHS and VARS that I've set up in first script Confused.. ok Well Cron calls a script... (3 Replies)
Discussion started by: cfoxwell
3 Replies
Login or Register to Ask a Question