Skip to main content
2 of 3
added 537 characters in body

Does the D-Bus service have a "SystemdService=" line pointing to a Systemd unit file, like "SystemdService=systemd_unit_name.service"? If yes, you can add a symlink from /etc/systemd/system/systemd_unit_name.service to /dev/null. This is how "systemctl mask systemd_unit_name.service" works.

Then any attempt to activate the D-Bus service will fail since the linked Systemd service is masked. But you may see some annoying logs in the journal about a failed activation since the service is masked.

If there is no SystemdService= line, you can try adding a symlink from /etc/systemd/system/dbus_unit_name.service to /dev/null (not tested). I assume if there is no alias mapping from a D-Bus unit file named "dbus_unit_name.service" to a Systemd unit file name "systemd_unit_name.service", the D-Bus activation will just look for a Systemd unit file with the same name as the D-Bus unit file, like "dbus_unit_name.service".

You can also override D-Bus system services in /etc/dbus-1/system-services/ I believe (again, not tested).