Become a MacRumors Supporter for $50/year with no ads, ability to filter front page stories, and private forums.

techmonkey

macrumors 6502a
Original poster
Jun 8, 2007
596
0
The terminal command to open Gnucash, which I compile/installed with Fink, is

/sw/bin/gnucash

Is there a way I can create a dock icon to run this? I tried creating an applescript, but the applescript stays open until I close gnucash.

Any suggestions?
 

chocodup

macrumors member
May 17, 2008
34
3
I wanted to do exactly the same thing today.
Here is what I did :

I wrote an apple script using the script editor :
tell application "Finder"
launch application "X11"
end tell
set results to do shell script "cd ~; DISPLAY=:0.0; export DISPLAY; PATH=$PATH:/sw/bin; export PATH ; /sw/bin/gnucash"​

Then, I saved it as an application.

Then, I changed the default "applescript icon" of my new application.
(I founded the icon at the following address : http://www.wallpaper-gratuit.net/icones/details.php?image_id=2290)

Here, I had an application that launches X11 and gnucash with an appropriate icon.

Last thing to do : drag the application to the Dock.

Hope this helps...
 

techmonkey

macrumors 6502a
Original poster
Jun 8, 2007
596
0
thanks cocodup. I will try this out later. Nice icon site, wish they had an english version though :)
 
Register on MacRumors! This sidebar will go away, and you'll see fewer ads.