On 15/7/09 04:50, Bob Jamison wrote:
my thought on the subject would be to have a launcher app that would:
- Sense if a Dbus framework is already running
- If not, start a user-level dbus daemon
- Run Inkscape, use your scripting and extensions
- When closing Inkscape, if you started your own daemon, close it, too.
This is similar to Mozilla running on Unix. It has one executable to set up the environment before the .bin is launched. When you quit Mozilla, they both close.
GIMP 2.6.6 on OS X (Leopard) comes with its on dbus-daemon and dbus-launch included in the application package. The final launcher scripts wrap the call of gimp-bin like this:
| LeWitt:bin suv$ more gimp | #!/bin/sh | | export PATH=/tmp/skl/Gimp.app/Contents/Resources/bin:$PATH | export GIMP2_DIRECTORY="Library/Application Support/Gimp" | | DBUS=`dbus-launch --sh-syntax` | eval $DBUS | echo $DBUS_SESSION_BUS_ADDRESS > /tmp/skl/dbus-address-$UID | | gimp-2.6 "$@" | | rm /tmp/skl/dbus-address-$UID | kill $DBUS_SESSION_BUS_PID | #killall dbus-daemon
and
| LeWitt:bin suv$ more gimp-remote | #!/bin/sh | | export PATH=/tmp/skl/Gimp.app/Contents/Resources/bin:$PATH | export GIMP2_DIRECTORY="Library/Application Support/Gimp" | | export DBUS_SESSION_BUS_ADDRESS=`cat /tmp/skl/dbus-address-$UID` | | exec gimp-2.6 "$@"
~suv