WelcomeWelcome | FAQFAQ | DownloadsDownloads | WikiWiki

Author Topic: DBUS is not started automatically  (Read 2653 times)

Offline bmarkus

  • Administrator
  • Hero Member
  • *****
  • Posts: 7183
    • My Community Forum
DBUS is not started automatically
« on: July 12, 2009, 11:50:21 AM »
DBUS is not started automatically when the extension installed. Also no startup script added. If DBUS extension is present one expect it will be used, so it can be started with a script in /usr/local/tce.installed with no harm.

Also, there are missing directories which have to be created otherwise daemon will not start.

This script executed as root starts DBUS properly:

Quote
#!/bin/sh

if [ ! -d /var/lib/dbus ]; then
    mkdir /var/lib/dbus
fi

dbus-uuidgen --ensure

if [ ! -d /etc/dbus-1/system.d ]; then
    mkdir /etc/dbus-1/system.d
fi

if [ ! -d /etc/dbus-1/session.d ]; then
    mkdir /etc/dbus-1/session.d
fi

if [ ! -d /var/run/dbus ]; then
    mkdir /var/run/dbus
fi

dbus-daemon --system
« Last Edit: July 12, 2009, 11:52:03 AM by bmarkus »
Béla
Ham Radio callsign: HA5DI

"Amateur Radio: The First Technology-Based Social Network."

Offline Juanito

  • Administrator
  • Hero Member
  • *****
  • Posts: 14851
Re: DBUS is not started automatically
« Reply #1 on: July 12, 2009, 01:53:35 PM »
The script to start dbus is included with the bluez and hplip extensions - the logic being that you would need to restart dbus after adding the dbus conf files for these applications.

Is there a need to start dbus in isolation - i.e. if it is not being used by anything else?

Offline bmarkus

  • Administrator
  • Hero Member
  • *****
  • Posts: 7183
    • My Community Forum
Re: DBUS is not started automatically
« Reply #2 on: July 13, 2009, 05:11:14 AM »
DBUS system bus is independent of the applications and a sytem service started when the core sytem starts up. Applications have noting to do with the DBUS configuration and they are not overwriting it, just caring with their own sessions. If applications changing system setup on their own system stability is in risk and this is against any normal operation practice. DBUS offers a polite way to do it.

So my advice is to start DBUS system bus always if DBUS is installed. If no need to use it, just do not install the extension.

Béla
Ham Radio callsign: HA5DI

"Amateur Radio: The First Technology-Based Social Network."