- If it is a "terminal" program, it will first launch Terminal
- If it is an X11 program, it will first lanch X11.
|
|
|
On Panther, you can click on the Finder icon of a Unix program to launch it:
•
[12,862 views]
Hint Options
10.3: Another Option
For quite some time after upgrading to OS X, I was baffled why no one ever mentioned the fact that you could cause shell scripts to simply run terminal-free with a double-click in the Finder by binding it to the Launcher app in the Utilities folder using Get Info. Later discovered that this app had not been installed by Apple, but rather by the Tcl/TkAqua Batteries Included package. It's available separately here:
Don't forget the Script Menu
>"Nice addition to the Panther features mentioned above if you run a lot of shell or perl scripts. Usually just run my shell scripts from Dragthing now."
10.3: Use the Finder to launch Unix apps
There must be another variable at play, because this does not work correctly in all cases for me. For, example, I use Fink, and if I go into /sw/bin, clicking on gnumeric works properly, but clicking on bluefish tries to open it using the Terminal instead of X11, and clicking on abiword gets me the dialog box saying that there is on default application to open it.
10.3: Use the Finder to launch Unix apps
My guess is the smarts are something along the lines of 'does it have an empty type and creator and the Unix execute bit is set', so you could check those things...
10.3: Use the Finder to launch Unix apps
Another solution is to make a shell script and put it inside the same directory structure that Apple uses.
Create a directory "SomeProg.app". Inside this create a directory "Contents". Inside "Contents" create a directory "MacOS". This is where you put the executable shell script. If you want SomeProg.app to have a proper icon that can be done as well but gets a little complicated. Inside "Contents" create another directory "Resources" This is where you put the icon you want to use. I was using this for a bookmarks sync script so I just grabbed the Mozilla icon from Mozilla.app. You will need to add a couple of files into SomeProg.app/Contents. Info.plist - which tells the finder the details about the program, like its version and its icon. PkgInfo - which again tells the finder that it is an application and should be run rather than opened. Heres my Info.plist:
My PkgInfo (8bytes only):
This setup is enough to completely fool the finder into thinking that its a full application, it also lets you run your own scripts from the Dock as well. If you get lost at all, use the terminal to look around the insides of some apps, thats what I did. Some of the keys in Info.plist may not be needed but it works none the less. Hope this helps. |
SearchFrom our Sponsor...Latest Mountain Lion HintsWhat's New:HintsNo new hintsComments last 2 daysLinks last 2 weeksNo recent new linksWhat's New in the Forums?
Hints by TopicNews from Macworld
From Our Sponsors |
|
Copyright © 2014 IDG Consumer & SMB (Privacy Policy) Contact Us All trademarks and copyrights on this page are owned by their respective owners. |
Visit other IDG sites: |
|
|
|
Created this page in 0.26 seconds |
|