Table of Contents

Currently viewing version: 0.1.1.0

66-tools

66-dbus-launch

66-dbus-launch is a tool for launching, supervising, and reacting to dbus-broker events emitted by relevant D-Bus signals.

Interface

    66-dbus-launch [ -h ] [ -z ] [ -v verbosity ] [ -d notif ]

66-dbus-launch acts as a launcher for the dbus-broker, spawning and managing a D-Bus Message Bus.

On receiving D-Bus or kernel signals, the launcher executes tasks based on the signal received(see Execution tasks). Each instance of 66-dbus-launch manages exactly one message bus. Each message bus is independent.

When started by a regular user, 66-dbus-launch will drop privileges before executing dbus-broker. The launcher only manages services and environments for the process owner, meaning a user launcher cannot manage root services or environments and vice versa.

This program is only built if the --enable-dbus= option is passed during compilation (see Build Requirements).

This tool is inspired by the dbus-controllers project and the original dbus-broker program.

Exit codes

Options

Execution Tasks

Start Time

At startup, 66-dbus-launch performs the following tasks:

It ensures that you use the latest D-Bus file declarations by overwriting any existing frontend files with the same name.

Running time

66-dbus-launch responds to kernel signals. A SIGHUP signal triggers a reading, parsing, translating and writting process. Synchronization of services can also be manually triggered via 66 reload dbus or 66 signal -s HUP dbus. It also synchronizes the available list of services between the launcher and the broke as follows: - If a D-Bus service file is removed, the launcher deactivates from the broker, executes 66 remove <service>, and erases the corresponding 66 frontend file. - If a new D-Bus service is found, the launcher triggers the reading, parsing, translating and writting process, and activates the service in the broker. - For an existing service with the same name, the launcher executes 66 parse -f <service> to ensure the latest D-Bus service declaration is used. Note that the service need to restarted for any changes to take effect.

66-dbus-launch reacts on D-Bus signals:

Stop time

Stopping the launcher invokes a 66 tree free dbus command, as each service frontend file declares InTree=dbus.

As the frontend file of each service declare InTree=dbus, stopping the launcher invoke a 66 tree free dbus command. This behavior may change in the future. For now, this reduce the surface of attack and guarantee you to always use a fresh installation of the service.

Example of 66-dbus-launch frontend file for 66

The following frontend file can be used to start a 66-dbus-launch daemon, either as root or as a regular user, by setting User=(root) or User=(user) in the example below:

[Main]
Type=classic
Description="Dbus-broker launcher for @U account"
User=(root)
Version=0.0.1
TimeoutStart=3000
TimeoutStop=3000
MaxDeath=5
Notify=3

[Start]
Execute=(66-dbus-launch -d3 -v${Verbosity})

[Environment]
Verbosity=!3

By default, the frontend file can be installed at /usr/share/66/service (for root) and /usr/share/66/service/user (for regular users).

Build requirements

Caveats

dbus-broker's policy API isn't yet stable, allowing broad access for now. Currently, 66-dbus-launch doesn't handle configuration files for D-Bus (e.g., /usr/share/dbus-1/{system,session}.conf).