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

Shell scripts are specifically for command line... (no mouse...)

Add the options in your menu :smiley:

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.

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.

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