Difference between revisions of "Getting Started/Tutorials/D-Bus/Configuration"

Jump to: navigation, search
(SYSCONF_INSTALL_DIR)
 
(33 intermediate revisions by one user not shown)
Line 1: Line 1:
{{Template:I18n/Language Navigation Bar|Getting_Started/Tutorials/D-Bus/Configuration}}
+
 
  
 
==Configuring for Services==
 
==Configuring for Services==
Line 5: Line 5:
 
===All KDE-4 versions===
 
===All KDE-4 versions===
  
If you instlled KDE in: "/usr/KDE-4, the D-Bus services will be installed in "/usr/KDE-4/share/dbus-1/services".  D-Bus needs to find these services and use them.
+
If you instlled KDE-4.x.y in: "/opt/KDE-4, the default location where D-Bus services will be installed is "/opt/KDE-4/share/dbus-1/services".  D-Bus needs to find these services and use them.
 +
 
 +
You can either change the default to install them in:
 +
 
 +
::/usr/share/dbus-1/services
 +
 
 +
by adding the CMake parameter:
 +
 
 +
::-DDBUS_SERVICES_INSTALL_DIR:PATH=/usr/share/dbus-1/services
  
If you only have one version of KDE installed and you normally use it, you need to add, for example:<pre>
+
Or, you can add, for example:<pre>
   <servicedir>/usr/KDE-4/share/dbus-1/services</servicedir>
+
   <servicedir>/opt/KDE-4/share/dbus-1/services</servicedir>
 
</pre>
 
</pre>
 
{use the actual path from your system}
 
{use the actual path from your system}
Line 14: Line 22:
 
to your: "/etc/dbus-1/session-local.conf" file.
 
to your: "/etc/dbus-1/session-local.conf" file.
  
If your system doesn't yet have that file, create it:
+
NOTE: Although you can place multiple paths for services in the "/etc/dbus-1/session-local.conf" file, if the services have the same name, only the last one will be used.  This may or may not cause problems if you have multiple versions of KDE on your system.
  
<nowiki>------8<------8<------8<------8<------8<------8<------8<------8<------8<------8<------8<------</nowiki><pre>
+
===KDE >= 4.4 and TRUNK===
<!DOCTYPE busconfig PUBLIC
+
"-//freedesktop//DTD D-BUS Bus Configuration 1.0//EN"
+
"http://www.freedesktop.org/standards/dbus/1.0/busconfig.dtd">
+
<busconfig>
+
  <servicedir>/usr/KDE-4/share/dbus-1/services</servicedir>
+
</busconfig>
+
</pre><nowiki>------8<------8<------8<------8<------8<------8<------8<------8<------8<------8<------8<------</nowiki>
+
  
{use the actual path from your system}
+
The current KDE-4.4 BRANCH and TRUNK also install a: "system-services" directory.  If you installed KDE-4.x.y in: "/opt/KDE-4, the D-Bus system services will be installed in "/opt/KDE-4/share/dbus-1/system-services". D-Bus needs to find these services and use them.
  
If you have installed an additional version of KDE-4 that you start with another user account according to the instructions for building KDE4.x, things are not as simple since you need to have the D-Bus services for that KDE-4 installation override the normal ones ONLY when using that user account.  Instead of adding the path for the service directory to: "/etc/dbus-1/session-local.conf" file, add this link:<pre>
+
You can either change the default to install them in:  
  <include ignore_missing="yes">$HOME/.config/dbus-1/session-local.conf</include>
+
</pre>
+
Then create the above: "session-local.conf" file in the: "$HOME/.config/dbus-1" directory (which you will have to create).
+
  
===KDE-4.4 and TRUNK===
+
::/usr/share/dbus-1/system-services
  
The current KDE-4.4 BRANCH and TRUNK also install a: "system-services" directory. 
+
by adding the CMake parameter:
If you installed KDE-4.4 in: "/usr/KDE-4.4, the D-Bus system services will be installed in "/usr/KDE-4.4/share/dbus-1/system-services". D-Bus needs to find these services and use them.
+
  
You need to add, for example:<pre>
+
::-DDBUS_SYSTEM_SERVICES_INSTALL_DIR:PATH=/usr/share/dbus-1/system-services
   <servicedir>/usr/KDE-4.4/share/dbus-1/system-services</servicedir>  
+
 
 +
Or, you can add, for example:<pre>
 +
   <servicedir>/opt/KDE-4/share/dbus-1/system-services</servicedir>  
 
</pre>
 
</pre>
 
{use the actual path from your system}  
 
{use the actual path from your system}  
  
 
to your: "/etc/dbus-1/system-local.conf" file.
 
to your: "/etc/dbus-1/system-local.conf" file.
 
If your system doesn't yet have that file, create it:
 
 
<nowiki>------8<------8<------8<------8<------8<------8<------8<------8<------8<------8<------8<------</nowiki><pre>
 
<!DOCTYPE busconfig PUBLIC
 
"-//freedesktop//DTD D-BUS Bus Configuration 1.0//EN"
 
"http://www.freedesktop.org/standards/dbus/1.0/busconfig.dtd">
 
<busconfig>
 
  <servicedir>/usr/KDE-4.4/share/dbus-1/system-services</servicedir>
 
</busconfig>
 
</pre><nowiki>------8<------8<------8<------8<------8<------8<------8<------8<------8<------8<------8<------</nowiki>
 
 
{use the actual path from your system}
 
  
 
NOTE: Although you can place multiple paths for system services in the "/etc/dbus-1/system-local.conf" file, if the services have the same name, only the last one will be used.  This may or may not cause problems if you have multiple versions of KDE on your system.
 
NOTE: Although you can place multiple paths for system services in the "/etc/dbus-1/system-local.conf" file, if the services have the same name, only the last one will be used.  This may or may not cause problems if you have multiple versions of KDE on your system.
Line 61: Line 47:
 
==SYSCONF_INSTALL_DIR==
 
==SYSCONF_INSTALL_DIR==
  
If you install two different versions of KDE-4 (including TRUNK) you will need to use the parameter: "SYSCONF_INSTALL_DIR" when running CMake.  Otherwise, you will be installing files with the same names from the two versions in the same location.
+
You can use the parameter: "SYSCONF_INSTALL_DIR" when running CMake to place the configuration directories where you want them which would normally be: "/etc/kde-4" or if installing multiple versions: "/etc/kde-<version>"
  
For example, if you install KDE-4.3 and KDE-4.4 use:
+
For example, if you use:
  
::-DSYSCONF_INSTALL_DIR=/etc/kde-4.3
+
::-DSYSCONF_INSTALL_DIR=/etc/kde-4
::-DSYSCONF_INSTALL_DIR=/etc/kde-4.4
+
 
+
respectively.
+
  
 
Then you must configure D-Bus to find these directories.
 
Then you must configure D-Bus to find these directories.
  
For example for "SYSCONF_INSTALL_DIR=/etc/kde-4.4", first if the directory:
+
First if one or both of the directories:
  
::/etc/kde-4.4/dbus-1/session.d
+
::/etc/kde-<version>/dbus-1/session.d
 +
::/etc/kde-<version>/dbus-1/system.d
  
doesn't exist, create it.
+
doesn't/don't exist, create it/them.
  
 
Then add:<pre>
 
Then add:<pre>
   <includedir>/etc/kde-4.4/dbus-1/session.d</includedir>
+
   <includedir>/etc/kde-4/dbus-1/session.d</includedir>
 
</pre>
 
</pre>
 
to your: "/etc/dbus-1/session-local.conf" file.
 
to your: "/etc/dbus-1/session-local.conf" file.
 +
 +
If you don't have the: "session-local.conf", create it:
 +
 +
<nowiki>------8<------8<------8<------8<------8<------8<------8<------8<------8<------8<------8<------</nowiki><pre>
 +
<!DOCTYPE busconfig PUBLIC
 +
"-//freedesktop//DTD D-BUS Bus Configuration 1.0//EN"
 +
"http://www.freedesktop.org/standards/dbus/1.0/busconfig.dtd">
 +
<busconfig>
 +
 +
  <!-- Search for .conf files in /etc/kde-4/dbus-1/session.d -->
 +
  <includedir>/etc/kde-4/dbus-1/session.d</includedir>
 +
 +
</busconfig>
 +
</pre>
 +
<nowiki>------8<------8<------8<------8<------8<------8<------8<------8<------8<------8<------8<------</nowiki>
  
 
And add:<pre>
 
And add:<pre>
   <includedir>/etc/kde-4.4/dbus-1/system.d</includedir>
+
   <includedir>/etc/kde-4/dbus-1/system.d</includedir>
 
</pre>
 
</pre>
 
to your: "/etc/dbus-1/system-local.conf" file.
 
to your: "/etc/dbus-1/system-local.conf" file.
  
If you don't have the: "system-local.conf", create it as above.
+
If you don't have the: "system-local.conf", create it:
 +
 
 +
<nowiki>------8<------8<------8<------8<------8<------8<------8<------8<------8<------8<------8<------</nowiki><pre>
 +
<!DOCTYPE busconfig PUBLIC
 +
"-//freedesktop//DTD D-BUS Bus Configuration 1.0//EN"
 +
"http://www.freedesktop.org/standards/dbus/1.0/busconfig.dtd">
 +
<busconfig>
 +
 
 +
  <!-- Search for .conf files in /etc/kde-4/dbus-1/system.d -->
 +
  <includedir>/etc/kde-4/dbus-1/system.d</includedir>
 +
 
 +
</busconfig>
 +
</pre>
 +
<nowiki>------8<------8<------8<------8<------8<------8<------8<------8<------8<------8<------8<------</nowiki>
 +
 
 +
==Policy files==
 +
 
 +
It is not possible to configure the location of the "*.policy" files.  therefore, you must build KDE-4 and: "polkit-kde-1" with:
 +
 
 +
::-DKDE4_AUTH_POLICY_FILES_INSTALL_DIR:STRING=/usr/share/PolicyKit/policy
  
===Policy files===
+
{for PolicyKit installed with a prefix of: "/usr"}

Latest revision as of 16:28, 19 July 2012


Contents

[edit] Configuring for Services

[edit] All KDE-4 versions

If you instlled KDE-4.x.y in: "/opt/KDE-4, the default location where D-Bus services will be installed is "/opt/KDE-4/share/dbus-1/services". D-Bus needs to find these services and use them.

You can either change the default to install them in:

/usr/share/dbus-1/services

by adding the CMake parameter:

-DDBUS_SERVICES_INSTALL_DIR:PATH=/usr/share/dbus-1/services
Or, you can add, for example:
  <servicedir>/opt/KDE-4/share/dbus-1/services</servicedir>

{use the actual path from your system}

to your: "/etc/dbus-1/session-local.conf" file.

NOTE: Although you can place multiple paths for services in the "/etc/dbus-1/session-local.conf" file, if the services have the same name, only the last one will be used. This may or may not cause problems if you have multiple versions of KDE on your system.

[edit] KDE >= 4.4 and TRUNK

The current KDE-4.4 BRANCH and TRUNK also install a: "system-services" directory. If you installed KDE-4.x.y in: "/opt/KDE-4, the D-Bus system services will be installed in "/opt/KDE-4/share/dbus-1/system-services". D-Bus needs to find these services and use them.

You can either change the default to install them in:

/usr/share/dbus-1/system-services

by adding the CMake parameter:

-DDBUS_SYSTEM_SERVICES_INSTALL_DIR:PATH=/usr/share/dbus-1/system-services
Or, you can add, for example:
  <servicedir>/opt/KDE-4/share/dbus-1/system-services</servicedir> 

{use the actual path from your system}

to your: "/etc/dbus-1/system-local.conf" file.

NOTE: Although you can place multiple paths for system services in the "/etc/dbus-1/system-local.conf" file, if the services have the same name, only the last one will be used. This may or may not cause problems if you have multiple versions of KDE on your system.

[edit] SYSCONF_INSTALL_DIR

You can use the parameter: "SYSCONF_INSTALL_DIR" when running CMake to place the configuration directories where you want them which would normally be: "/etc/kde-4" or if installing multiple versions: "/etc/kde-<version>"

For example, if you use:

-DSYSCONF_INSTALL_DIR=/etc/kde-4

Then you must configure D-Bus to find these directories.

First if one or both of the directories:

/etc/kde-<version>/dbus-1/session.d
/etc/kde-<version>/dbus-1/system.d

doesn't/don't exist, create it/them.

Then add:
  <includedir>/etc/kde-4/dbus-1/session.d</includedir>

to your: "/etc/dbus-1/session-local.conf" file.

If you don't have the: "session-local.conf", create it:

------8<------8<------8<------8<------8<------8<------8<------8<------8<------8<------8<------
<!DOCTYPE busconfig PUBLIC
 "-//freedesktop//DTD D-BUS Bus Configuration 1.0//EN"
 "http://www.freedesktop.org/standards/dbus/1.0/busconfig.dtd">
<busconfig>

  <!-- Search for .conf files in /etc/kde-4/dbus-1/session.d -->
  <includedir>/etc/kde-4/dbus-1/session.d</includedir>

</busconfig>

------8<------8<------8<------8<------8<------8<------8<------8<------8<------8<------8<------

And add:
  <includedir>/etc/kde-4/dbus-1/system.d</includedir>

to your: "/etc/dbus-1/system-local.conf" file.

If you don't have the: "system-local.conf", create it:

------8<------8<------8<------8<------8<------8<------8<------8<------8<------8<------8<------
<!DOCTYPE busconfig PUBLIC
 "-//freedesktop//DTD D-BUS Bus Configuration 1.0//EN"
 "http://www.freedesktop.org/standards/dbus/1.0/busconfig.dtd">
<busconfig>

  <!-- Search for .conf files in /etc/kde-4/dbus-1/system.d -->
  <includedir>/etc/kde-4/dbus-1/system.d</includedir>

</busconfig>

------8<------8<------8<------8<------8<------8<------8<------8<------8<------8<------8<------

[edit] Policy files

It is not possible to configure the location of the "*.policy" files. therefore, you must build KDE-4 and: "polkit-kde-1" with:

-DKDE4_AUTH_POLICY_FILES_INSTALL_DIR:STRING=/usr/share/PolicyKit/policy

{for PolicyKit installed with a prefix of: "/usr"}


This page was last modified on 19 July 2012, at 16:28. This page has been accessed 11,048 times. Content is available under Creative Commons License SA 3.0 as well as the GNU Free Documentation License 1.2.
KDE® and the K Desktop Environment® logo are registered trademarks of KDE e.V.Legal