executing shell scripts from finder

I have stupidly reassociated .sh files with TextEdit and now they won't automatically execute when selected from the Finder. For instance, JBoss only starts via shell scripts and I used to be able to start it just via double-clicking the run.sh file from the finder.

How do I fix this?


Thanks

Chris

(Yes I can still run them by opening Terminal and executing them there, but that is not what I want.)

17" PowerBook G4, 20" iMac (Intel), Mac OS X (10.4.6)

Posted on Aug 3, 2006 2:46 PM

Reply
9 replies

Aug 4, 2006 12:31 AM in response to bdmarsha

If I understand your question, then you should be
able to select one of these files and change the Open
With item in the Get Info window. Be sure to select
Change All.

For a more permanent and more elegant fix, look into
Automator's Do Shell Script command. They could be
wrapped into an Automator app using this command.

bd


Yes but change to open with which application?

Basically I want to revert back to the behaviour before I buggered it up. I used to be able to run JBoss by double clicking the shell script, now it opens in TextEdit because I stupidly changed it to always open with that, and did it for all files.

So the question is, what should I be opening the shell scripts with?

Aug 4, 2006 8:57 AM in response to Kappy

Well, shell scripts are just text files. So, I'm not
sure what you think the problem is. No association
is required because a shell script would launch an
application from commands in the script, not an
association with an application.


I really they are just text files. The problem is this.

I have the Applications folder dragged to the dock so I can right click on it and run anything underneath.

JBoss is installed under the Applications directory. It is a complete unix program, not OS X, thus it runs from the shell scripts provided. When I first installed I could select the run.sh script from the dock by right clicking on Applications, navigating through the menu that popped up and selecting it. It would run that shell script and start JBoss. Now it opens TextEdit instead.

I want to reverse it back to running the shell script automatically like it was before.

Aug 4, 2006 10:31 AM in response to krustyfur

Well, then I suppose you could try selecting the shell script and pressing COMMAND-I to open the Get Info window. In the Open With section select the desired default application from the drop down menu and then close the Get Info window. However, I don't know what default application you should use. I suspect it would be the actual unix shell (I think that's bash) but I don't know if that's even accessible from the Get Info window.

If it were me I'd just completely reinstall JBoss. I think that would fix the problem.

This thread has been closed by the system or the community team. You may vote for any posts you find helpful, or search the Community for additional answers.

executing shell scripts from finder

Welcome to Apple Support Community
A forum where Apple customers help each other with their products. Get started with your Apple Account.