[MacPorts] #20505: dbus doesn't work
#20505: dbus doesn't work ---------------------------------+------------------------------------------ Reporter: vinc17@… | Owner: mcalhoun@… Type: defect | Status: new Priority: High | Milestone: Component: ports | Version: 1.7.1 Keywords: | Port: dbus ---------------------------------+------------------------------------------ It seems that dbus is completely broken. Applications that use it, such as gnucash and liferea, output an error: Dynamic session lookup supported but failed: launchd did not provide a socket path, verify that org.freedesktop.dbus-session.plist is loaded! and they don't work. One problem is that /Library/LaunchDaemons/org.freedesktop.dbus- system.plist refuses to work (without any error message!!!) if a file /opt/local/var/run/dbus/pid already exists. Since {{{ /opt/local/bin/dbus-daemon --system --nofork }}} wasn't running, I tried it from the command line and got: {{{ $ sudo /opt/local/bin/dbus-daemon --system --nofork Unknown group "netdev" in message bus configuration file Failed to start message bus: The pid file "/opt/local/var/run/dbus/pid" exists, if the message bus is not running, remove this file }}} So, I did {{{ sudo launchctl unload -w /Library/LaunchDaemons/org.freedesktop.dbus- system.plist sudo launchctl unload -w /Library/LaunchAgents/org.freedesktop.dbus- session.plist sudo rm /opt/local/var/run/dbus/pid sudo launchctl load -w /Library/LaunchDaemons/org.freedesktop.dbus- system.plist sudo launchctl load -w /Library/LaunchAgents/org.freedesktop.dbus- session.plist }}} Now, everything seems to be OK: a ps auxww shows {{{ messageb 9449 0.0 0.0 27940 716 ?? Ss 1:15AM 0:00.01 /opt/local/bin/dbus-daemon --system --nofork root 9454 0.0 0.0 27940 708 ?? Ss 1:16AM 0:00.01 /opt/local/bin/dbus-daemon --nofork --session }}} and /opt/local/var/run/dbus contains {{{ -rw-r--r-- 1 root messagebus 5 2009-08-01 01:15:54 pid srwxrwxrwx 1 root messagebus 0 2009-08-01 01:15:54 system_bus_socket }}} but I still get the same error. If the bug due to the error about the unknown group "netdev"? -- Ticket URL: <http://trac.macports.org/ticket/20505> MacPorts <http://www.macports.org/> Ports system for Mac OS
#20505: dbus doesn't work ---------------------------------+------------------------------------------ Reporter: vinc17@… | Owner: mcalhoun@… Type: defect | Status: new Priority: High | Milestone: Component: ports | Version: 1.7.1 Keywords: | Port: dbus ---------------------------------+------------------------------------------ Comment(by jonas@…): As you're `ps auxww` shows, the session bus runs for the user root. That means, your user doesn't have a session bus running and so the error message "Dynamic session lookup supported but failed: launchd did not provide a socket path, verify that org.freedesktop.dbus-session.plist is loaded!" is correct. The parameter `-w` to `launchctl load` removes the disabled-key from the plist. After that it's loaded automatically on startup (launch deamons once per system, launch agens once per user). To prevent a reboot you can simply load the plist as you normal user (''not'' using sudo). My original patch (#17950) for the dbus port which introduced launchd support contained an notice saying exactly that. I've no idea why the current maintainer removed this message in r49300 (line 98 in the old file). Now it tells you explicitly to use sudo, which is wrong as it results exactly in the error you've run into... Well, maybe not completely wrong, things are a bit more complicated. You need sudo in conjunction with the `-w` parameter, else the disabled-key can't be removed from the plist-file. But to load launch''agents'' afterwards sudo loads it for the wrong user (for root instead of yours) HTH, Jonas -- Ticket URL: <http://trac.macports.org/ticket/20505#comment:1> MacPorts <http://www.macports.org/> Ports system for Mac OS
#20505: dbus doesn't work ---------------------------------+------------------------------------------ Reporter: vinc17@… | Owner: mcalhoun@… Type: defect | Status: new Priority: High | Milestone: Component: ports | Version: 1.7.1 Keywords: | Port: dbus ---------------------------------+------------------------------------------ Comment(by vinc17@…): Thanks, this works. So, the documentation needs to be fixed. Also I'm wondering: can't the session bus be started on demand? -- Ticket URL: <http://trac.macports.org/ticket/20505#comment:3> MacPorts <http://www.macports.org/> Ports system for Mac OS
#20505: dbus doesn't work ---------------------------------+------------------------------------------ Reporter: vinc17@… | Owner: mcalhoun@… Type: defect | Status: new Priority: High | Milestone: Component: ports | Version: 1.7.1 Keywords: | Port: dbus ---------------------------------+------------------------------------------ Comment(by jonas@…): Replying to [comment:3 vinc17@…]:
Also I'm wondering: can't the session bus be started on demand?
It can, but it due to a bug in 10.4 "Tiger" it works only from 10.5 (hopefully ;-)) upwards. Just change the value of the `OnDemand`-key in the plist. Maybe Marcus, the current maintainer, could not only update the documentation in the portfile but also activate on-demand starting on 10.5 -- Ticket URL: <http://trac.macports.org/ticket/20505#comment:4> MacPorts <http://www.macports.org/> Ports system for Mac OS
#20505: dbus doesn't work ---------------------------------+------------------------------------------ Reporter: vinc17@… | Owner: mcalhoun@… Type: defect | Status: new Priority: High | Milestone: Component: ports | Version: 1.7.1 Keywords: | Port: dbus ---------------------------------+------------------------------------------ Comment(by vinc17@…): I have Tiger. :( But now I start the dbus session from my .zlogin, so that's not much a problem. -- Ticket URL: <http://trac.macports.org/ticket/20505#comment:5> MacPorts <http://www.macports.org/> Ports system for Mac OS
#20505: dbus doesn't work ---------------------------------+------------------------------------------ Reporter: vinc17@… | Owner: mcalhoun@… Type: defect | Status: new Priority: High | Milestone: Component: ports | Version: 1.7.1 Keywords: | Port: dbus ---------------------------------+------------------------------------------ Comment(by illogic-al@…): Replying to [comment:5 vinc17@…]:
I have Tiger. :( But now I start the dbus session from my .zlogin, so that's not much a problem. Unnecessary. Once you start it once as a user, on subsequent system restarts, it loads automatically.
-- Ticket URL: <http://trac.macports.org/ticket/20505#comment:6> MacPorts <http://www.macports.org/> Ports system for Mac OS
#20505: dbus doesn't work ---------------------------------+------------------------------------------ Reporter: vinc17@… | Owner: mcalhoun@… Type: defect | Status: new Priority: High | Milestone: Component: ports | Version: 1.7.1 Keywords: | Port: dbus ---------------------------------+------------------------------------------ Comment(by vinc17@…): Replying to [comment:6 illogic-al@…]:
Unnecessary. Once you start it once as a user, on subsequent system restarts, it loads automatically.
This doesn't work on my machine. I need to restart it explicitly after reboot. -- Ticket URL: <http://trac.macports.org/ticket/20505#comment:7> MacPorts <http://www.macports.org/> Ports system for Mac OS
#20505: dbus doesn't work ---------------------------------+------------------------------------------ Reporter: vinc17@… | Owner: mcalhoun@… Type: defect | Status: new Priority: Normal | Milestone: Component: ports | Version: 1.7.1 Keywords: | Port: dbus ---------------------------------+------------------------------------------ Changes (by toby@…): * priority: High => Normal -- Ticket URL: <http://trac.macports.org/ticket/20505#comment:8> MacPorts <http://www.macports.org/> Ports system for Mac OS
#20505: dbus doesn't work ---------------------------------+------------------------------------------ Reporter: vinc17@… | Owner: mcalhoun@… Type: defect | Status: new Priority: Normal | Milestone: Component: ports | Version: 1.7.1 Keywords: | Port: dbus ---------------------------------+------------------------------------------ Comment(by Juneappal@…): Replying to [comment:3 vinc17@…]:
Thanks, this works. So, the documentation needs to be fixed.
What exactly worked? I made the same mistake (issuing the command with sudo, per compile-time instructions) Is the fix as simple as reissuing those commands with the -w flag? -- Ticket URL: <http://trac.macports.org/ticket/20505#comment:9> MacPorts <http://www.macports.org/> Ports system for Mac OS
#20505: dbus doesn't work ---------------------------------+------------------------------------------ Reporter: vinc17@… | Owner: mcalhoun@… Type: defect | Status: new Priority: Normal | Milestone: Component: ports | Version: 1.7.1 Keywords: | Port: dbus ---------------------------------+------------------------------------------ Comment(by vinc17@…): Replying to [comment:9 Juneappal@…]:
What exactly worked? I made the same mistake (issuing the command with sudo, per compile-time instructions) Is the fix as simple as reissuing those commands with the -w flag?
For the second command, do '''not''' use sudo. The -w flag seems to be necessary (even though one gets an error message). That is, {{{ launchctl load -w /Library/LaunchAgents/org.freedesktop.dbus-session.plist }}} -- Ticket URL: <http://trac.macports.org/ticket/20505#comment:10> MacPorts <http://www.macports.org/> Ports system for Mac OS
#20505: dbus doesn't work ----------------------------------+----------------------------------------- Reporter: vinc17@… | Owner: mcalhoun@… Type: defect | Status: closed Priority: Normal | Milestone: Component: ports | Version: 1.7.1 Resolution: worksforme | Keywords: Port: dbus | ----------------------------------+----------------------------------------- Changes (by raimue@…): * status: new => closed * resolution: => worksforme Comment: Assuming this is fixed as `port notes dbus` already contains the `-w` flag. -- Ticket URL: <http://trac.macports.org/ticket/20505#comment:11> MacPorts <http://www.macports.org/> Ports system for Mac OS
participants (1)
-
MacPorts