Opened 14 years ago

Closed 14 years ago

Last modified 14 years ago

#28271 closed defect (worksforme)

DBUS_SESSION_BUS_ADDRESS is not set and dbus-launch cannot work

Reported by: ionutg@… Owned by: MarcusCalhoun-Lopez (Marcus Calhoun-Lopez)
Priority: Normal Milestone:
Component: ports Version: 1.9.2
Keywords: Cc:
Port: dbus

Description

In the current setup, dbus-daemon is started from launchd which then sets DBUS_LAUNCHD_SESSION_BUS_SOCKET to communicate the location of the unix socket. However, unless DBUS_SESSION_BUS_ADDRESS is set, dbus-launch will automatically resort to --autolaunch, which needs X11, which is not compiled in.

The current situation is a problem for meld http://lists.macosforge.org/pipermail/macports-users/2011-January/023218.html, used to be a problem for kde4 http://www.mailinglistarchive.com/html/fink-users@lists.sourceforge.net/2010-04/msg00125.html and should be a problem for any process which connects by calling dbus-launch (are there other ways? I am totally new to dbus).

The workaround I have found so far is to enable /Library/LaunchDaemons/org.freedesktop.dbus-system.plist and respectively /Library/LaunchAgents/org.freedesktop.dbus-session.plist and modify ~/.bash_profile

export DBUS_SESSION_BUS_ADDRESS=unix:path=$DBUS_LAUNCHD_SESSION_BUS_SOCKET

I don't know what the standard way to connect to the dbus is, but dbus-launch.c can easily be patched to search for DBUS_LAUNCHD_SESSION_BUS_SOCKET.

Ionut

Change History (4)

comment:1 Changed 14 years ago by ionutg@…

Cc: ionutg@… added

Cc Me!

comment:2 Changed 14 years ago by mf2k (Frank Schima)

Cc: ionutg@… removed
Owner: changed from macports-tickets@… to mcalhoun@…

The reporter is automatically Cced. Instead you should Cc the port maintainer(s) in the future.

comment:3 Changed 14 years ago by jmroot (Joshua Root)

Resolution: worksforme
Status: newclosed

Can't reproduce; Meld works fine for me. I can get the error from the first link if I unload dbus. The writer of that message says he used sudo when loading the session plist, which is simply wrong.

comment:4 Changed 14 years ago by ionutg@…

How did you compile gtk2? I compiled with +quartz +no_x11

Note: See TracTickets for help on using tickets.