Opened 12 years ago

Closed 10 years ago

#37474 closed enhancement (wontfix)

dbus: eliminate the need to manually run launchctl load -w /Library/LaunchAgents/org.freedesktop.dbus-session.plist

Reported by: cginsburg@… Owned by: MarcusCalhoun-Lopez (Marcus Calhoun-Lopez)
Priority: Normal Milestone:
Component: ports Version: 2.1.2
Keywords: Cc: cooljeanius (Eric Gallager)
Port: dbus

Description

When completing a fresh install of macports, it would be nice to have "launchctl load -w /Library/LaunchAgents/org.freedesktop.dbus-session.plist" automatically executed - even when being run via sudo. It took me quite a while to realize this step was necessary.

Change History (3)

comment:1 Changed 12 years ago by ryandesign (Ryan Carsten Schmidt)

Owner: changed from macports-tickets@… to mcalhoun@…
Port: dbus added
Summary: eliminate the need to manually run launchctl load -w /Library/LaunchAgents/org.freedesktop.dbus-session.plistdbus: eliminate the need to manually run launchctl load -w /Library/LaunchAgents/org.freedesktop.dbus-session.plist

It isn't our custom to start launchdaemons for you. Launchd plists that are installed automatically using startupitem.create are not started for you; MacPorts just prints a message telling you how to do so. For most such ports, the launchd plists start servers that require some manual configuration before they're started.

dbus is unusual in that org.freedesktop.dbus-session.plist is installed manually, not using startupitem.create, and no configuration is required, so there would be value in having things automatically started. However I don't think we are able to do so. As the notes say:

$ port notes dbus
dbus has the following notes:
  ############################################################################
  # Startup items have been generated that will aid in
  # starting dbus with launchd. They are disabled
  # by default. Execute the following command to start them,
  # and to cause them to launch at startup:
  #
  # sudo launchctl load -w /Library/LaunchDaemons/org.freedesktop.dbus-system.plist
  # launchctl load -w /Library/LaunchAgents/org.freedesktop.dbus-session.plist
  ############################################################################

So as you see, dbus-system needs to be started as root, and dbus-session needs to be started as your user, and furthermore starting dbus-session needs to be done individually by every user who wants to use dbus-compatible software. MacPorts is started as root (using sudo) and then drops privileges to the "macports" user. There is no time at which MacPorts is running as your user account, so there's no way for MacPorts to start dbus-session for you.

comment:2 Changed 12 years ago by cooljeanius (Eric Gallager)

Cc: egall@… added

Cc Me!

comment:3 Changed 10 years ago by MarcusCalhoun-Lopez (Marcus Calhoun-Lopez)

Resolution: wontfix
Status: newclosed

For the reasons noted in comment:1, the current situation is unlikely to change.
This ticket probably should have been closed back then.

Note: See TracTickets for help on using tickets.