Bug 18013 - dbus autolaunch fails on OS X 10.5 because of '/' characters in $DISPLAY
Summary: dbus autolaunch fails on OS X 10.5 because of '/' characters in $DISPLAY
Status: RESOLVED MOVED
Alias: None
Product: dbus
Classification: Unclassified
Component: core (show other bugs)
Version: 1.5
Hardware: All All
: low normal
Assignee: D-Bus Maintainers
QA Contact: D-Bus Maintainers
URL:
Whiteboard: review?
Keywords: patch
Depends on:
Blocks:
 
Reported: 2008-10-11 04:16 UTC by dpj
Modified: 2018-10-12 21:04 UTC (History)
2 users (show)

See Also:
i915 platform:
i915 features:


Attachments
Patches dbus-launch-x11.c to replace '/' characters with '_' in the session filename. (288 bytes, patch)
2008-10-11 04:16 UTC, dpj
Details | Splinter Review

Description dpj 2008-10-11 04:16:59 UTC
Created attachment 19585 [details] [review]
Patches dbus-launch-x11.c to replace '/' characters with '_' in the session filename.

dbus autolaunch fails on OS X 10.5 Leopard because the DISPLAY environment variable contains '/' forward slash characters. 

dbus-launch fails when it tries to write the session file, the name of which contains '/' characters, so the fopen() call fails as it tries to create directories.

I've made a patch for dbus-launch-x11.c which changes all '/' characters to '_' characters.
Comment 1 Mike McQuaid 2010-12-30 03:22:19 UTC
Is this still necessary now we have launchd patches included?
Comment 2 Jonas Bähr 2010-12-30 05:07:30 UTC
No application should relay on $DISPLAY, as it's not portable. Although it's possible that some applications ported to OS-X use X11 for the GUI, they shouldn't use it to start dbus. In fact, no client should do this directly but rather use the dbus client lib which does handle this the correct way (that is launchd on OS-X).

Anyways, this patch doesn't seem to harm but it fixes deprecated stuff. Unless of course if other X11 systems may also have a slash in their $DISPLAY env var, but in this case this is not an OS-X bug.
Comment 3 Simon McVittie 2014-09-11 09:39:19 UTC
If use of X11 to coordinate dbus-daemon startup under OS X is undesired, I would recommend that anyone building dbus on OS X (Fink, MacPorts, etc.) should not enable the optional X11 support.
Comment 4 GitLab Migration User 2018-10-12 21:04:41 UTC
-- GitLab Migration Automatic Message --

This bug has been migrated to freedesktop.org's GitLab instance and has been closed from further activity.

You can subscribe and participate further through the new bug through this link to our GitLab instance: https://gitlab.freedesktop.org/dbus/dbus/issues/8.


Use of freedesktop.org services, including Bugzilla, is subject to our Code of Conduct. How we collect and use information is described in our Privacy Policy.