From 5f63d1e429b671f49bb89b8a7095277b8fbe3dee Mon Sep 17 00:00:00 2001 From: Leo Franchi Date: Sun, 4 Oct 2009 11:18:44 -0400 Subject: D-Bus formula --- Library/Formula/d-bus.rb | 87 ++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 87 insertions(+) create mode 100644 Library/Formula/d-bus.rb diff --git a/Library/Formula/d-bus.rb b/Library/Formula/d-bus.rb new file mode 100644 index 000000000..84b1c85b4 --- /dev/null +++ b/Library/Formula/d-bus.rb @@ -0,0 +1,87 @@ +require 'brewkit' + +class DBus + + + + Label + org.freedesktop.dbus-system + ProgramArguments + + #{bin}/dbus-daemon + --system + --nofork + + OnDemand + + Disabled + + + + EOS + end + + def caveats; <<-EOS +The dbus system bus can auto-start with OS X, but it requires a symlink in +your system library dir. Run the next two commands to hook things up: + + sudo ln -s #{prefix}/Library/LaunchAgents/org.freedesktop.dbus-session.plist /Library/LaunchAgents/org.freedesktop.dbus-session.plist + sudo ln -s #{prefix}/Library/LaunchDaemons/org.freedesktop.dbus-system.plist /Library/LaunchDaemons/org.freedesktop.dbus-system.plist + +You will also need to make the two launchd files owned by root, otherwise OS X +will complain: + + sudo chown root:admin #{prefix}/Library/LaunchAgents/org.freedesktop.dbus-session.plist + sudo chown root:admin #{prefix}/Library/LaunchDaemons/org.freedesktop.dbus-system.plist + +Note that you will have to change them back to a user ownership, as well as +remove the symlinks when uninstalling, as homebrew won't be able to erase +them. + +If you want dbus to auto-start, run the following two commands: + + sudo launchctl load -w /Library/LaunchDaemons/org.freedesktop.dbus-system.plist + launchctl load /Library/LaunchAgents/org.freedesktop.dbus-session.plist + +Then it will autostart when needed from the next reboot. + +Also, if programs are having trouble connecting to the dbus session, add this +to your /etc/profile: + + export DBUS_SESSION_BUS_ADDRESS="launchd:env=DBUS_LAUNCHD_SESSION_BUS_SOCKET" + EOS + end +end -- cgit v1.2.3