You are not logged in.

#1 2014-12-06 01:27:33

Alad
Wiki Admin/IRC Op
From: Bagelstan
Registered: 2014-05-04
Posts: 2,412
Website

Disable dbus services without native systemd service available

Quite a few services are not activated manually, but through dbus. Say you wanted to disable some (enough valid reasons, using DE apps in WM environments, temporary until bug X is fixed, or a workaround for quirks like default file manager in Firefox). If the service file in /usr/share/dbus-1/... contains a line SystemdService=<something>, then it's easy enough:

# systemctl mask <sth>.service
# systemctl mask <sth>.socket

which links the requests to /dev/null (quite loudly though).

Anyway say the dbus file doesn't have a matching unit, you could do a few things. First is obviously delete or modify the dbus file in /usr/share/.., you can then chattr it or ignore it in pacman.conf but it still breaks package integrity (pacman -kk). Looking through the dbus-daemon man gives:

<servicedir>
Adds a directory to scan for .service files. [..] systemwide bus.

<standard_session_servicedirs/>

is equivalent to specifying a series of <servicedir/> elements for each of the data directories in the "XDG Base Directory Specification" with the subdirectory "dbus-1/services", so for example "/usr/share/dbus-1/services" would be among the directories searched. [..]

The <standard_session_servicedirs/> option is only relevant to the per-user-session bus daemon defined in /etc/dbus-1/session.conf. Putting it in any other configuration file would probably be nonsense.

<standard_system_servicedirs/>

<standard_system_servicedirs/> specifies the standard system-wide activation directories that should be searched for service files. This option defaults to /usr/share/dbus-1/system-services.

The <standard_system_servicedirs/> option is only relevant to the per-system bus daemon defined in /etc/dbus-1/system.conf. Putting it in any other configuration file would probably be nonsense.

Ok, so I tried to put files in /etc/dbus-1/services but they didn't take priority. Also tried to specify the paths explicitely in /etc/dbus-1/system-local.conf but no luck either. Also tried ~/.local/share/dbus-1/services - but e.g gvfs would still start after changing Exec to /bin/false.

There's a few bug reports/requests on this, e.g (1). So my question is, am I missing something, or do you need a systemd unit, or go "dirty" and modify system files?

Cheers

Alad

Last edited by Alad (2014-12-06 01:28:16)


Mods are just community members who have the occasionally necessary option to move threads around and edit posts. -- Trilby

Offline

Board footer

Powered by FluxBB