Problem starting OS X version
Mike Alexander
mta at umich.edu
Fri Jan 1 23:26:22 EST 2010
--On January 1, 2010 7:43:29 PM -0800 John Ralls <jralls at ceridwen.us>
wrote:
>
> On Jan 1, 2010, at 6:02 PM, Mike Alexander wrote:
>
>> --On January 1, 2010 8:21:44 AM -0800 John Ralls
>> <jralls at ceridwen.us> wrote:
>>
>>> The dbus daemon stays running because there's no way to return to
>>> the shell script and kill it when Gnucash exits. Finding a running
>>> dbus's pid won't help because gnucash needs the session id to
>>> connect to, and it isn't saved anywhere -- though I suppose the
>>> launcher script might be able to get around that.
>>
>> That's a problem that launchd is meant to solve. It should be
>> possible for the first run script to create a launchd plist that
>> controlled the startup of the dbus daemon and then let launchd
>> handle the rest, more or less like MacPorts handles the problem. To
>> be completely correct you would also have to catch the first attempt
>> to run GnuCash by a user other than the one that installed it and do
>> the appropriate launchctl command for that user too. The dbus
>> daemon would keep running, but subsequent runs of GnuCash would
>> connect to it and not start a new one.
>
> Ah, good thought. I hadn't considered trying to get launchctl into
> it. Is MacPorts using a stock dbus-daemon, or did someone hack it to
> get it to cooperate with launchd?
Good point. There are patches in the MacPorts version to make it
cooperate with launchd. I helped work on these months ago and I
thought they had been included in the upstream version, but when I
looked now I found that they haven't been. The patches used by MacPorts
are taken from FreeDesktop Bugzilla entry 14259
<https://bugs.freedesktop.org/show_bug.cgi?id=14259>, but these patches
haven't been integrated into any released version of dbus. This
probably means that this is not a viable option for the native GnuCash
in MacOSX. Too bad, it works well.
Mike
More information about the gnucash-user
mailing list