GNOMEish way of doing dbus :)
Fridrich Strba
fridrich.strba at bluewin.ch
Wed Apr 14 04:18:34 PDT 2010
On Wed, 2010-04-14 at 12:56 +0200, Ralf Habacker wrote:
> on KDE windows the following directories are searched by default
>
> 1. default service dir: <dbus-install-root>/data/dbus-1/services
> 2. default service dir: <CommonProgramFiles>/dbus-1/services
>
> where <dbus-install-root> will be detected on runtime from the location
> of the shared dbus library according to one of these possible path layouts.
>
> <dbus-install-root>/bin/[lib]dbus-1.dll
> <dbus-install-root>/[lib]dbus-1.dll
>
> and <CommonProgramFiles> is the content of the environment variable
> "CommonProgramFiles".
> According to your above statement it looks to me, that KDE uses the same
> assumption and there is no need to change anything.
OK, will have to look again. Maybe some cmake vs. autofoo differences.
BTW, what is the
> How does an exec path in a service file looks in gnome/windows - like
> the one below ?
>
> exec=DBUS_PREFIX/bin/test-service.exe
yeah or maybe
exec=DBUS_PREFIX/libexec/some-service-without-extension
But it is the same scenario.
> Services located in 1. (which are from the dbus installation or if dbus
> is part of a bigger package from that package) are able to use relativ
> pathes without any relation to the installation prefix.
>
> <dbus-install-root>/data/dbus-1/services/test.service
> exec=../../../bin/test-service.exe
>
> service files using case 2 will not work without any relation to the
> installation prefix.
>
> <CommonProgramFiles>/dbus-1/services/test.service
> exec=../../<dbus-install-root>/bin/test-service.exe
>
> - having a string like DBUS_PREFIX as root will solve this problems.
>
> exec=DBUS_PREFIX/bin/test-service.exe
>
> On the other side this raises the question to which dbus installation
> root DBUS_PREFIX will be expanded, when multiple dbus installations are
> available.
>
> I guess that services installed in <CommonProgramFiles>/dbus-1/services
> are services from 3rd party applications using dbus as standalone
> package. Because those packages are installed somewhere in
> %PROGRAMFILES%/<package-install-root> they have to use an absolute path
> to the service executable. The conclusion is that there is no need for a
> DBUS_PREFIX here or are I'm completly wrong ?
OK, I relocate the prefix only if the string starts by that prefix, so
if the full path is not having the configure time prefix as it's
beginning, I will not touch it and dbus will get it unmodified.
The problem with the relative paths is that they would have to be
computed on configure time. Because a user can simply define
--with-libexecdir=<prefix>/lib/<package_name> and assuming
--with-libexecdir=<prefix>/libexec would not work.
OTOH, I also understand the danger of relocating stuff that should not
be relocated. That is why the relocation is done only under restrictive
conditions.
Cheers
Fridrich
More information about the dbus
mailing list