Questions tagged [dbus]

D-Bus is a message bus system, which allows client programs to call procedures on a service - basically, the machine-local equivalent to XML-RPC and SOAP.

D-Bus is a message bus system, designed to provide ways for programs to communicate with each other. D-Bus uses remote procedures to allow a client to call methods on a "service", and is conceptually similar to XML-RPC and SOAP. D-Bus, however, is designed for use in applications running on a single system. The FAQ offers a comparison to other well known IPC systems, as well as other general questions.

D-Bus is, in addition to an implementation, a specification - the document itself is freely available. In addition, an Introduction To D-Bus gives a high-level overview of how D-Bus is designed.

D-Bus, although used on POSIX systems (usually Linux and the *BSDs), has been ported to Windows and has been officially added to the specification.

D-Bus related questions will typically be how do I accomplish [X] in D-Bus - D-Bus is technical enough that most any question relating to it will be on topic.

1376 questions
12
votes
4 answers

What is the underlying transport for D-Bus?

D-Bus allows programs to communicate. How is this IPC implemented? Unix domain sockets, shared memory + semaphores, named pipes, something else? Maybe a combination?
fish
  • 1,970
  • 1
  • 18
  • 18
12
votes
6 answers

How to write a functional test for a DBUS service written in Python?

(Title was: "How to write a unit test for a DBUS service written in Python?") I've started to write a DBUS service using dbus-python, but I'm having trouble writing a test case for it. Here is an example of the test I am trying to create. Notice…
seanhodges
  • 17,426
  • 15
  • 71
  • 93
12
votes
1 answer

Message bus over ZeroMQ

I'm going to implement a distributed message bus over ZeroMQ and I'm trying to make it as efficient as possible. My requirements are: multiple processes are connected to a bus, some of them are on the same machine, some not. processes can subscribe…
remdezx
  • 2,939
  • 28
  • 49
12
votes
1 answer

D-Bus threading model

I am starting to use D-Bus as the IPC mechanism for a new project in Linux/KDE. And I've discovered that the documentation does not really address concurrency at all. How are D-Bus services expected to deal with multiple concurrent calls coming in…
Rob H
  • 14,502
  • 8
  • 42
  • 45
11
votes
2 answers

set/get property using dbus-send

I have made below sample xml and need some help in forming dbus-send command to set/get propoerty "Status". I know how to call methods, but not able to read/write property using dbus-send. xml:
Prashant Gaur
  • 135
  • 1
  • 1
  • 5
11
votes
2 answers

What is a 'slot' in sd-bus (C language)

There are several APIs in systemd's sd-bus.h file which optionally take a slot argument. Here's some examples: int sd_bus_call_async(sd_bus *bus, sd_bus_slot **slot, sd_bus_message *m, sd_bus_message_handler_t callback, void *userdata, uint64_t…
Benjamin Leinweber
  • 2,774
  • 1
  • 24
  • 41
11
votes
2 answers

Start a service in docker container failed,with error: Failed to get D-Bus connection: No connection to service manager

I installed docker image and built a image successfully. When I ssh to the container and run the command service xxx start, an error popped: service nginfra start Redirecting to /bin/systemctl start nginfra.service /sbin/service: line 79:…
baoxinru
  • 111
  • 1
  • 1
  • 3
11
votes
2 answers

System D-Bus does not allow punching out ownership with conf files

I am trying to create a daemon service that runs on the system bus where the permissions for sending and receiving from this service should be completely open to anybody. (Security is not a concern for this service). When I attempt to register the…
Mike
  • 728
  • 1
  • 7
  • 27
11
votes
2 answers

X11 Dependency, Compile Dbus without X11, starting only Shell C++ Applications Raspbian Linux

Hello Dear SO Community :) I am trying to get DBus working on my Raspberry Pi. The example code from libdbus-c++-1 is working fine when i am in the Pi Desktop environment -> (startx) My researches on the internet and the examples i found on…
Dogan
  • 181
  • 2
  • 7
11
votes
1 answer

D-Bus linking issue

I have been trying to compile a program for dbus and as suggested I did in the code as mention to a similar question. I did execute it as shown: gcc `pkg-config --cflags dbus-glib-1` \ `pkg-config --cflags dbus-1` \ `pkg-config --cflags…
vku
  • 175
  • 1
  • 1
  • 10
11
votes
2 answers

D-Bus Send variant via d-feet

I use D-Feet D-Bus debugger to investigate some interfaces. One of them requires a variant type to be send as an argument (which means that you can send anything). But I have trouble sending the argument as variant - normal python syntax would be…
powerbar
  • 323
  • 3
  • 14
10
votes
2 answers

Is there a way to get the uid of the other end of a unix socket connection

Is there a way for a UNIX domain socket listener to only accept connection from certain user (chmod/chown does not work for abstract socket afaik), or in another word, get the uid of the incoming connection (on Linux)? Dbus, which uses abstract unix…
yuyichao
  • 768
  • 6
  • 28
10
votes
2 answers

Access another user's D-Bus session

Let's assume this kind of situation: we have one user logged in, executing some application through sudo or su. This user has got a dbus-daemon running. However, when an application running with root privileges tries to access D-Bus, it just spawns…
Dr McKay
  • 2,548
  • 2
  • 21
  • 26
10
votes
1 answer

No such interface 'org.freedesktop.DBus.Properties' on object at path /org/freedesktop/NetworkManager/ActiveConnection/

I start my qt application in the user's .profile file (not root) to make the app start on boot. Sometimes when my application start, it reports an warning as below: "No such interface 'org.freedesktop.DBus.Properties' on object at path…
YouCL
  • 93
  • 1
  • 3
  • 11
10
votes
3 answers

Run dbus-daemon inside Docker container

I am trying to create a Docker container with a custom D-Bus bus running inside. I configured my Dockerfile as follow: FROM ubuntu:16.04 COPY myCustomDbus.conf /etc/dbus-1/ RUN apt-get update && apt-get install -y dbus RUN dbus-daemon…
oOnez
  • 887
  • 2
  • 11
  • 23
1 2
3
91 92