Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

dbus-broker-launch does not respect XDG_DATA_DIRS #40

Closed
mbiebl opened this issue Aug 28, 2017 · 8 comments
Closed

dbus-broker-launch does not respect XDG_DATA_DIRS #40

mbiebl opened this issue Aug 28, 2017 · 8 comments

Comments

@mbiebl
Copy link

mbiebl commented Aug 28, 2017

My first attempt at working around #38 was to create an empty file /usr/local/share/dbus-1/services/org.kde.dolphin.FileManager1.service

It seems though as if dbus-broker-launch completely ignores any paths set via XDG_DATA_DIRS and only looks at /usr/share/dbus-1/services.

@teg teg self-assigned this Aug 28, 2017
@teg
Copy link
Contributor

teg commented Aug 28, 2017

Thanks for the report!

@dvdhrm
Copy link
Member

dvdhrm commented Aug 28, 2017

Yeah, I am aware of this. This is implemented by dbus-daemon as the standard_{session,system}_servicedirs configuration option. We should really follow XDG_DATA_DIRS here, rather than just hard-coding the single default path.

@teg teg removed their assignment Aug 28, 2017
@dvdhrm
Copy link
Member

dvdhrm commented Aug 28, 2017

@mbiebl, we now properly parse all the directories. See 28b926d.

I will close this. Lets track the duplicate-file handling in the other issue.

Thanks a lot!

@dvdhrm dvdhrm closed this as completed Aug 28, 2017
@carewolf
Copy link

carewolf commented Feb 7, 2018

But where do you set XDG_DATA_DIRS so that it is picked up by the dbus launch? It apparently never reads .profile or related user setup files.

@dvdhrm
Copy link
Member

dvdhrm commented Feb 7, 2018

With XDG_DATA_DIRS I was mainly referring to the xdg-specification, not the env-variable itself. Right now, we never read the XDG_DATA_DIRS environment variable, but rather just use the default search-path as defined by the spec. However, we will gladly implement support for the env-variable, if that is needed.

Can you elaborate what your use-case is? Why exactly do you need to adjust the broker's search path for service files?

Furthermore, please note that only the session bus honors XDG_DATA_DIRS. The system bus uses hard-coded search-paths (we follow dbus-daemon(1) behavior here).

Lastly, XDG_DATA_HOME is properly supported. That is, ~/.local/share is searched by default, unless you make XDG_DATA_HOME point to some other directory.

Also, dbus-broker is usually spawned through its systemd unit, just like dbus-daemon is. So any environment variables available to systemd --user are inherited by dbus-broker (I think...). Can you elaborate on your use-case? I'd be interested what setup you have, so we can see whether XDG_DATA_DIRS should be implemented.

@carewolf
Copy link

carewolf commented Feb 7, 2018

The use-case is to have an application/DE installed in a prefix. See also https://blog.martin-graesslin.com/blog/2014/06/dbus-activation-for-apps-in-prefix/

There is a work-around by using system setup, but it would be better if the launched dbus session daemon would read user variables.

@dvdhrm
Copy link
Member

dvdhrm commented Feb 7, 2018

Fair enough.

@dvdhrm
Copy link
Member

dvdhrm commented Feb 28, 2018

Completely forgot about this bug-report, I should have re-opened it...

Anyway, XDG_DATA_DIRS is now supported in the newest release. Thanks a lot for the comments from everyone involved!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants