Bug 40387 - DBUS should follow the XDG Base Directory spec for configuration
Summary: DBUS should follow the XDG Base Directory spec for configuration
Status: RESOLVED WONTFIX
Alias: None
Product: dbus
Classification: Unclassified
Component: core (show other bugs)
Version: 1.3.x (devel)
Hardware: All Linux (All)
: low minor
Assignee: Havoc Pennington
QA Contact: John (J5) Palmieri
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2011-08-25 22:16 UTC by Wolfram
Modified: 2018-08-14 12:13 UTC (History)
1 user (show)

See Also:
i915 platform:
i915 features:


Attachments

Description Wolfram 2011-08-25 22:16:04 UTC
Could DBUS please follow the XDG Base Directory Specification for the configuration/data directory on linux/freebsd?

more infos here:
- http://standards.freedesktop.org/basedir-spec/basedir-spec-latest.html
- http://www.freedesktop.org/wiki/Software/pyxdg
- https://wiki.ubuntu.com/LittleDetails#Use%20XDG%20folders
Comment 1 Simon McVittie 2011-08-26 02:10:20 UTC
What configuration did you have in mind?

The entire system bus is out-of-scope for the base directory spec, because it's system-wide, rather than being used by any particular user.

~/.dbus should probably stay as a hard-coded path relative to $HOME, because its purpose is to be accessed consistently from any session, so it can't rely on the XDG environment variables being set consistently. If we redo the autolaunch/dbus-launch mechanisms, possibly it could move into XDG_DATA_HOME, but before doing that we need to work out which usages are actually supported (multiple sessions for a user on one machine? session spread between machines, sharing an X server and an NFS $HOME? etc.) and I don't see that happening any time soon.

~/.dbus-keyrings has to be a hard-coded path relative to $HOME, because its purpose is to be used on TCP buses in conjunction with NFS $HOME, to prove that a connecting user is who they say they are, by writing to a file that only they control (analogous to ~/.ssh/authorized_keys); allowing it to be overridden by environment variables would be a security vulnerability.

/etc/dbus-1/session.conf could conceivably be overridden by a file in ${XDG_CONFIG_DIRS}/dbus-1/session.conf, although I'm having a hard time seeing why you'd want to - the session bus configuration is already more or less maximally permissive, so the only useful change I can think of is switching session buses to TCP if you're running sessions distributed across many machines sharing an X server and an NFS $HOME, which seems like a sysadmin job anyway.

Session .service files are already read from ${XDG_DATA_DIRS}/dbus-1/services.
Comment 2 Wolfram 2011-08-26 02:20:54 UTC
I'm talking about ~/.dbus*, so that's very sad.


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.