How can I create a dock icon/shortcut for Gnucash (installed with fink)?

Discussion in 'Mac Programming' started by techmonkey, May 15, 2008.

  1. techmonkey macrumors 6502a

    Joined:
    Jun 8, 2007
    #1
    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?
     
  2. chocodup macrumors member

    chocodup

    Joined:
    May 17, 2008
    #2
    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...
     
  3. techmonkey thread starter macrumors 6502a

    Joined:
    Jun 8, 2007
    #3
    thanks cocodup. I will try this out later. Nice icon site, wish they had an english version though :)
     

Share This Page