{"id":1607,"date":"2011-01-23T13:07:32","date_gmt":"2011-01-23T13:07:32","guid":{"rendered":"http:\/\/really.zonky.org\/?p=1607"},"modified":"2011-01-23T13:07:32","modified_gmt":"2011-01-23T13:07:32","slug":"osx-macports-and-dbus","status":"publish","type":"post","link":"https:\/\/really.zonky.org\/?p=1607","title":{"rendered":"OSX, MacPorts, and DBUS"},"content":{"rendered":"<p>During a recent upgrade of the software I have installed on my work laptop, <a href=\"http:\/\/www.macports.org\/\">Macports<\/a> managed to get a\u00a0trifle\u00a0confused during the process. Firstly Enlightenment suddenly started crashing at the drop of a hat, and secondly dbus suddenly started refusing connections and claiming that X11 support was not built-in.<\/p>\n<p>The first problem I solved by comping Enlightenment (E16) from scratch and overwriting the Enlightenment installed from Macports &#8211; probably not the right thing to do. It turns out that the Macport version of Enlightenment is very outdated and could do with a refresh.<\/p>\n<p>The second problem was a little trickier, and may have been solved in a slightly more Macport compatible manner. In fact this problem was two problems in one. First of all, any attempt to start a GNOME-based (or presumably anything wanting to talk to dbus) would give an error indicating that X11 support was missing.<\/p>\n<p>I fixed this by recompiling dbus manually :-<\/p>\n<pre># port mirror dbus\r\n#   Gets a copy of the source code used to compile the source\r\n# cd \/opt\/local\/var\/macports\/distfiles\/dbus\r\n#   Change to directory where the source code is located\r\n# gunzip -c dbus-1.2.24.tar.gz| tar tvf -\r\n#   Unpack the source code\r\n# cd dbus-1.2.24\r\n#   Enter the directory that we've just unpacked.\r\n# .\/configure --prefix=\/opt\/local\r\n#   Configure the package.<\/pre>\n<p>If you look at the last few lines of the output from this configuration process, you will see a message of the form &#8220;Building X11 code: yes&#8221; which is what we want to see &#8211; that X11 support is being built. At this point we can build and install :-<\/p>\n<pre># make\r\n# make install<\/pre>\n<p>The next problem was that attempting to use the automatically launched version of dbus resulted in a &#8220;permission denied&#8221; error when trying to communicate over the socket. The work-around for this turned out to be to :-<\/p>\n<ol>\n<li>To turn off the <em>launchd<\/em> control of dbus by renaming the files <em>\/Library\/LaunchAgents\/org.freedesktop\/dbus-session.plist<\/em> and <em>\/Library\/LaunchDaemons\/org.freedesktop\/dbus-session.plist<\/em> by putting a &#8220;.&#8221; in front of their name. This stops <em>launchd<\/em> from starting anything.<\/li>\n<li>Changing the <em>.xinitrc<\/em> to start dbus using the syntax <em>eval $(dbus-launch &#8211;auto-syntax)<\/em> (note that I explicitly ensure that this script is launched with <em>zsh<\/em>).<\/li>\n<\/ol>\n","protected":false},"excerpt":{"rendered":"<p>During a recent upgrade of the software I have installed on my work laptop, Macports managed to get a\u00a0trifle\u00a0confused during the process. Firstly Enlightenment suddenly started crashing at the drop of a hat, and secondly dbus suddenly started refusing connections and claiming that X11 support was not built-in. The first problem I solved by comping <a href='https:\/\/really.zonky.org\/?p=1607' class='excerpt-more'>[&#8230;]<\/a><\/p>\n","protected":false},"author":2,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"jetpack_post_was_ever_published":false,"_jetpack_newsletter_access":"","_jetpack_dont_email_post_to_subs":false,"_jetpack_newsletter_tier_id":0,"_jetpack_memberships_contains_paywalled_content":false,"_jetpack_memberships_contains_paid_content":false,"footnotes":"","jetpack_publicize_message":"","jetpack_publicize_feature_enabled":true,"jetpack_social_post_already_shared":false,"jetpack_social_options":{"image_generator_settings":{"template":"highway","default_image_id":0,"font":"","enabled":false},"version":2},"_share_on_mastodon":"0"},"categories":[226],"tags":[798,171,170],"class_list":["post-1607","post","type-post","status-publish","format-standard","hentry","category-working-notes","tag-dbus","tag-macports","tag-osx","category-226-id","post-seq-1","post-parity-odd","meta-position-corners","fix"],"share_on_mastodon":{"url":"","error":""},"jetpack_publicize_connections":[],"jetpack_featured_media_url":"","jetpack_sharing_enabled":true,"jetpack_shortlink":"https:\/\/wp.me\/p1f2KI-pV","_links":{"self":[{"href":"https:\/\/really.zonky.org\/index.php?rest_route=\/wp\/v2\/posts\/1607","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/really.zonky.org\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/really.zonky.org\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/really.zonky.org\/index.php?rest_route=\/wp\/v2\/users\/2"}],"replies":[{"embeddable":true,"href":"https:\/\/really.zonky.org\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=1607"}],"version-history":[{"count":1,"href":"https:\/\/really.zonky.org\/index.php?rest_route=\/wp\/v2\/posts\/1607\/revisions"}],"predecessor-version":[{"id":1608,"href":"https:\/\/really.zonky.org\/index.php?rest_route=\/wp\/v2\/posts\/1607\/revisions\/1608"}],"wp:attachment":[{"href":"https:\/\/really.zonky.org\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=1607"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/really.zonky.org\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=1607"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/really.zonky.org\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=1607"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}