GnuCash Not Happy With External File Renaming
Ron Westfall
westfall at shaw.ca
Thu May 5 02:01:40 EDT 2016
On 2016-05-02 10:25 AM, Tommy Trussell wrote:
>
> You might try creating a (bash?) script containing your gnucash launch
> commands (being sure to use the full path names because the script
> won't be running in the same directory as your app). Name it with the
> extension ".command" and make it executable. (I don't know whether you
> can suppress the opening of the Terminal window without using a
> separate utility, but maybe there's a way you can close the window
> from the script somehow.)
>
> http://stackoverflow.com/questions/5125907/how-to-run-a-shell-script-in-os-x-by-double-clicking
>
> I don't have my Mac up and running today, but maybe that and a few
> Internet searches can get you there. If you find a solution that
> doesn't require a third party utility, maybe you could add the
> instructions to the Gnucash wiki.
>
> -----
> Please remember to CC this list on all your replies.
> You can do this by using Reply-To-List or Reply-All.
>
>
Hi Tommy
Your thoughts were the same as mine. I created an executable bash
script in a file named openX (change X to something appropriate):
#!/bin/bash
open -a Gnucash --args "/absolute/path/to/X.gnucash"
I did not add a suffix to the script file name. The Stackoverflow
article you referenced indicated that the script file can either use no
suffix or a .command suffix. Any other suffix may result in the script
not being executed when double-clicked.
In the MacOS X finder, the script file icon is a black box with tiny
green letters reading "exec" indicating that the file is a script.
When the script file is double-clicked, a Terminal window is opened to
execute the script. Normally Terminal would leave the window open when
the script finishes, but this behaviour can be changed. In Terminal's
Preferences, select Profiles. Within the Profiles tab, select the Shell
second level tab. Under the label "When the shell exits:", change the
dropdown selection from "Don't close the window" to "Close if the shell
exited cleanly". The only caveat is that this choice affects all
scripts run by Terminal, so you may have to change it again at some
point to get the desired behaviour for different circumstances.
Ron
More information about the gnucash-user
mailing list