dbus de-prioritizes XDG_DATA_HOME -- can't customize user session

Bug #726471 reported by danmb
12
This bug affects 2 people
Affects Status Importance Assigned to Milestone
D-Bus
Fix Released
Medium
dbus (Ubuntu)
Fix Released
Undecided
Unassigned

Bug Description

Binary package hint: dbus

I tried to over-ride /usr/share/dbus-1/services/org.gnome.ScreenSaver.service by creating a ~/.local/share/dbus-1/services/org.gnome.ScreenSaver.service file (because gnome-screensaver runs even when xscreensaver is active). This file gets ignored. If I put the file in /usr/local/share/..., it overrides the default as expected.

The XDG Base Directory Specification clearly states in

http://standards.freedesktop.org/basedir-spec/basedir-spec-latest.html

"The base directory defined by $XDG_DATA_HOME is considered more important than any of the base directories defined by $XDG_DATA_DIRS. The base directory defined by $XDG_CONFIG_HOME is considered more important than any of the base directories defined by $XDG_CONFIG_DIRS."

Yet the relevant source code in dbus looks like (dbus/dbus-sysdeps-unix.c):

  if (!_dbus_string_append (&servicedir_path, DBUS_DATADIR":"))
        goto oom;
/* ... */
      if (!_dbus_string_append (&servicedir_path, xdg_data_home))
        goto oom;

i.e. XDG_DATA_HOME is used AFTER XDG_DATA_DIRS

This is a very serious issue that prevents the user from overriding misguided system-wide configuration.

ProblemType: Bug
DistroRelease: Ubuntu 10.04
Package: dbus 1.2.16-2ubuntu4.1
ProcVersionSignature: Ubuntu 2.6.31-11.154-rt
Uname: Linux 2.6.31-11-rt i686
Architecture: i386
Date: Mon Feb 28 12:23:48 2011
InstallationMedia: Xubuntu 10.04 "Lucid Lynx" - Release i386 (20100429)
ProcEnviron:
 LC_COLLATE=C
 PATH=(custom, user)
 LANG=en_US.utf8
 SHELL=/bin/bash
SourcePackage: dbus

Revision history for this message
danmb (danmbox) wrote :
Revision history for this message
danmb (danmbox) wrote :

The bug obviously affects Maverick and Natty as well. It has been fixed in GIT and will be in 1.4.8:

https://bugs.freedesktop.org/show_bug.cgi?id=35569

I hope this fix will be backported to 1.4.6 (on freedesktop.org and/or here), because it would be quite annoying to have to deal with buggy Ubuntus for years to come now.

Changed in dbus:
importance: Unknown → High
status: Unknown → Invalid
Anders Kaseorg (andersk)
Changed in dbus:
importance: High → Unknown
status: Invalid → Unknown
Changed in dbus:
importance: Unknown → Medium
status: Unknown → Fix Released
Revision history for this message
danmb (danmbox) wrote :

I wonder why this bug is marked as Fix Released? Upstream has indeed fixed the problem, but on a different branch (dbus 1.4.8). Ubuntu has 1.4.6 and AFAICT the fix hasn't been backported.

Revision history for this message
Anders Kaseorg (andersk) wrote :

Dan, if you look at the top of this bug page, you’ll see that two different statuses are listed. One is “Fix Released” for the upstream bug, and the other is “New” for the Ubuntu bug. Don’t worry, the bug is still open.

Revision history for this message
danmb (danmbox) wrote :

Thanks, I missed the second status line.

Revision history for this message
Anders Kaseorg (andersk) wrote :

dbus 1.4.8-3ubuntu1 is in oneiric now with this fix.

Changed in dbus (Ubuntu):
status: New → Fix Released
Revision history for this message
danmb (danmbox) wrote :

... which is only a dream at this point :)

I guess I should request a backport to my installed version?

Revision history for this message
Román (faneca) wrote :

Are there any possibilities to backport the fix to the LTS distribution (Lucid Lynx)?

To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.