dbus issues
https://gitlab.freedesktop.org/dbus/dbus/-/issues
2023-05-27T07:19:05Z
https://gitlab.freedesktop.org/dbus/dbus/-/issues/8
dbus autolaunch fails on OS X 10.5 because of '/' characters in $DISPLAY
2023-05-27T07:19:05Z
Bugzilla Migration User
dbus autolaunch fails on OS X 10.5 because of '/' characters in $DISPLAY
## Submitted by dpj..@..nt.com
Assigned to **D-Bus Maintainers**
**[Link to original bug (#18013)](https://bugs.freedesktop.org/show_bug.cgi?id=18013)**
## Description
Created attachment 19585
Patches dbus-launch-x11.c to replace ...
## Submitted by dpj..@..nt.com
Assigned to **D-Bus Maintainers**
**[Link to original bug (#18013)](https://bugs.freedesktop.org/show_bug.cgi?id=18013)**
## Description
Created attachment 19585
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.
**Patch 19585**, "Patches dbus-launch-x11.c to replace '/' characters with '_' in the session filename.":
[dbus-launch-x11.c.patch](/uploads/100a91964717f04b15c39853005a3efd/dbus-launch-x11.c.patch)
Version: 1.5
https://gitlab.freedesktop.org/dbus/dbus/-/issues/12
dbus-launch fails if user in too many groups OS X 10.5
2023-05-27T07:19:05Z
Bugzilla Migration User
dbus-launch fails if user in too many groups OS X 10.5
## Submitted by Glen Whitney
Assigned to **D-Bus Maintainers**
**[Link to original bug (#19309)](https://bugs.freedesktop.org/show_bug.cgi?id=19309)**
## Description
Created attachment 21522
proposed patch to handle >17 groups on ...
## Submitted by Glen Whitney
Assigned to **D-Bus Maintainers**
**[Link to original bug (#19309)](https://bugs.freedesktop.org/show_bug.cgi?id=19309)**
## Description
Created attachment 21522
proposed patch to handle >17 groups on Mac OS X 10.5
As of release 1.2.10, on Mac OS X 10.5, if a user attempting to execute
dbus_launch is in more than 17 groups, dbus-launch will always fail with the message:
Failed to get groups for user `<username>` primary GID `<gid>`: Unknown error 0
The cause to the problem appears to be the fact that under 10.5, getgrouplist() fails to update buf_count to the true number of groups when the buffer has too few slots to fit them all.
There is a detailed account of how this exact bug affected some GIMP users on gimper.net: http://gimper.net/viewtopic.php?f=18&t=3185&st=0&sk=t&sd=a&sid=a679a167e0a62ffbd984d06ac0be982f&start=0
Obviously a developer there ("skl") was able to work around the issue, but as far as I can tell s/he never posted the patches nor opened a DBus ticket. Since the bug also hit me (in getting Gnucash to work via macports) I thought I should open a ticket. I have attached the patch I used to correct the issue in my installation. The patch includes a long comment with further technical details.
Thanks for looking into whether this patch or a similar fix can be incorporated into a future release of DBus. Yours, Glen
**Patch 21522**, "proposed patch to handle >17 groups on Mac OS X 10.5":
[patch-dbus-sysdeps-unix.c.diff](/uploads/6cc42e81e9d026782c540cd7edb053ba/patch-dbus-sysdeps-unix.c.diff)
Version: 1.5
https://gitlab.freedesktop.org/dbus/dbus/-/issues/146
Included configuration file "org.freedesktop.dbus-session.plist" contains dep...
2020-09-28T11:45:51Z
Bugzilla Migration User
Included configuration file "org.freedesktop.dbus-session.plist" contains deprecated fields, requires user intervention on old OSX
## Submitted by Zac Bentley
Assigned to **D-Bus Maintainers**
**[Link to original bug (#94494)](https://bugs.freedesktop.org/show_bug.cgi?id=94494)**
## Description
There is a plist file included with the dbus distro to make it pl...
## Submitted by Zac Bentley
Assigned to **D-Bus Maintainers**
**[Link to original bug (#94494)](https://bugs.freedesktop.org/show_bug.cgi?id=94494)**
## Description
There is a plist file included with the dbus distro to make it place nicely with OSX's launchd. That file is visible at https://cgit.freedesktop.org/dbus/dbus/tree/bus/org.freedesktop.dbus-session.plist.in
It has two issues on recent (post 10.4/10.5) versions of the OSX operating system:
- It uses the deprecated "ServiceIPC" key. This either does nothing (deceptive) or generates lots of warnings in the OSX syslog equivalent complaining about the use of a deprecated field. See the following link for admittedly sketchy info on the deprecation, though the warnings definitely do occur on versions after 10.4: http://mac-os-forge.2317878.n4.nabble.com/About-the-ServiceIPC-key-td189335.html
- It has a manually-commented section disabling the "OnDemand" key, with user instructions to uncomment that section on OSX 10.4.
These require user intervention to suppress errors on new OSX versions or to get things working on old versions.
Two fixes should be made:
- The plist file should be templated by the build system, and the "ServiceIPC" key should be removed on OSX versions greater than 10.4.
- The "OnDemand" section should only be present on OSX versions <= 10.4; it should be ommitted in subsequent versions. If users want to hand-configure OnDemand enabling or disabling for other reasons, they are free to do so.
Version: git master
https://gitlab.freedesktop.org/dbus/dbus/-/issues/157
[OS X] : enable standard (non-launchd) dbus-launch and the use of privileged ...
2020-09-28T12:27:25Z
Bugzilla Migration User
[OS X] : enable standard (non-launchd) dbus-launch and the use of privileged services via the system bus
## Submitted by René J.V. Bertin
Assigned to **D-Bus Maintainers**
**[Link to original bug (#97927)](https://bugs.freedesktop.org/show_bug.cgi?id=97927)**
## Description
Created attachment 126778
patch against the master branch, #...
## Submitted by René J.V. Bertin
Assigned to **D-Bus Maintainers**
**[Link to original bug (#97927)](https://bugs.freedesktop.org/show_bug.cgi?id=97927)**
## Description
Created attachment 126778
patch against the master branch, #1e43857
After discussing this on the ML ("about using privileged (KAuth) helpers: system dbus daemon on OS X?") I think it is about time to open a ticket with a patch that I feel I can propose as a reference implementation.
This patch combines 2 wishes of mine:
1- being able to launch a session daemon when logged in remotely to OS X/macOS, i.e. when launchd cannot be used. In that case the OS is used as a traditional Unix, typically with X11 providing remote display, and there are no technical reasons why DBus wouldn't support this mode of operation ("shouldn't" may be a different thing).
I'm including this because making this possible was in fact in large part a side-effect of the 2nd wish:
2- allow the use of privileged services via the system bus, for instance those based on the KF5 KAuth framework.
With hindsight, point 2 was very easy to implement because the the mechanism to launch the privileged service executable is works as intended on OS X. What failed was the basic libdbus initialisation in the service executable, which didn't provide a session bus address entry in the bus_connection_addresses array.
Given the context the exact value of that entry is without importance. On Linux it would be set to "autolaunch:"; in the attached patch I set it to "launchd:env=DBUS_LAUNCHD_SESSION_BUS_SOCKET" because that appears to be an existing convention. Enabling the code path that takes care of setting this fallback value is what made it relevant to include point 1 above.
There are a few points that are open to discussion:
- is "launchd:env=FOO" indeed an appropriate fallback address? I don't think it will ever be used but may overlook a borderline situation.
- should the org.freedesktop.dbus-system.plist launchd profile provided by my patch be installed by default or should it be optional or an operation to be done manually? Note that installing it doesn't load profile.
- should _dbus_lookup_launchd_socket() indeed check the value of DBUS_LAUNCHD_SESSION_BUS_SOCKET in the environment, and if so should that value have priority over the value obtained from launchctl? The intention I had with the addition was to give a similar mechanism to override the "default" session bus as can be achieved on Linux by overriding DBUS_SESSION_BUS_ADDRESS. NB: changing the DBUS_LAUNCHD_SESSION_BUS_SOCKET value via launchctl has an immediate session-wide effect.
**Patch 126778**, "patch against the master branch, #1e43857":
[combined-patch.diff](/uploads/2a377b384d5b2f4e0feb42c19b21e7b3/combined-patch.diff)
Version: git master
https://gitlab.freedesktop.org/dbus/dbus/-/issues/246
autolaunch:scope=*install-path for Mac
2021-05-06T08:40:49Z
Hannah von Reth
autolaunch:scope=*install-path for Mac
On Windows we have the feature and it enables us to provide standalone installers for KDE applications.
To improve our KDE Mac support it would be awesome to have something similar there, to allow a autolaunched dbus per .app dir.
Thanks.
On Windows we have the feature and it enables us to provide standalone installers for KDE applications.
To improve our KDE Mac support it would be awesome to have something similar there, to allow a autolaunched dbus per .app dir.
Thanks.
https://gitlab.freedesktop.org/dbus/dbus/-/issues/309
Failure to raise FD limit on macOS (10.15.6)
2021-12-17T13:01:23Z
sourtin
Failure to raise FD limit on macOS (10.15.6)
I'm not sure from what version of macOS dbus begins to fail, but at least on 10.15.6 the following error occurs:
```
dbus-daemon[90437]: [session uid=501 pid=90437] org.freedesktop.DBus.Error.Failed: Failed to set fd limit to 9223372036...
I'm not sure from what version of macOS dbus begins to fail, but at least on 10.15.6 the following error occurs:
```
dbus-daemon[90437]: [session uid=501 pid=90437] org.freedesktop.DBus.Error.Failed: Failed to set fd limit to 9223372036854775807: Invalid argument
```
This is because of the following compatibility issue as listed on `man setrlimit`:
```
COMPATIBILITY
setrlimit() now returns with errno set to EINVAL in places that historically succeeded. It no
longer accepts "rlim_cur = RLIM_INFINITY" for RLIM_NOFILE. Use "rlim_cur = min(OPEN_MAX,
rlim_max)".
```
Attached is a very simple [patch][patch] to resolve this, as indicated by the man-page suggestion.
[patch]: /uploads/0796912c292fbd19636d3ea67bbde670/macos_rlim.patch
https://gitlab.freedesktop.org/dbus/dbus/-/issues/311
Inability to use X11 autolaunch on macOS
2021-12-17T13:01:23Z
sourtin
Inability to use X11 autolaunch on macOS
macOS included X11 up until version 10.7. Since its removal, X11 support is optionally provided by the [XQuartz][XQuartz] project. Unfortunately, the hostname advertised by XQuartz in the `DISPLAY` environmental variable is a path of the...
macOS included X11 up until version 10.7. Since its removal, X11 support is optionally provided by the [XQuartz][XQuartz] project. Unfortunately, the hostname advertised by XQuartz in the `DISPLAY` environmental variable is a path of the form `/private/tmp/com.apple.launchd.mBSMLJ3yQU/org.macosforge.xquartz`. The consequence is that when DBus attempt to open a session file at `~/${DBUS_DIR}/${DBUS_SESSION_BUS_DIR}/${DISPLAY}` it fails because the path `~/${DBUS_DIR}/${DBUS_SESSION_BUS_DIR}//private/tmp/com.apple.launchd.mBSMLJ3yQU/` does not exist.
A simple fix is possible by replacing `/` with `_`. As `get_session_file` already replaces the (often) invalid file character `:` with `_`, this approach has precedent. This shouldn't change behaviour on any other systems as either `$DISPLAY` does not include the `/` character, in which case there is no change, or it does include it in which case DBus fails to launch on that system too.
[XQuartz]: https://www.xquartz.org/