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
7
votes
1 answer

Using gdbus to start a systemd service

I've created a new systemd service that I would like to be able to active via a dbus call. The service simply executes a shell script. I've defined the service…
RandomUser
  • 4,140
  • 17
  • 58
  • 94
7
votes
1 answer

D-Bus Desktop Notification using dbus-rs

I would like to send desktop notifications through D-BUS using https://crates.io/crates/dbus. My current approach is: let c = Connection::get_private(BusType::Session).unwrap(); //let m = Message::new_method_call("org.freedesktop.DBus", "/",…
hoodie
  • 193
  • 5
7
votes
2 answers

qdbusxml2cpp unknown type

While using the qdbusxml2cpp program to convert the following xml to a Qt Class, I am getting this error: qdbusxml2cpp -c ObjectManager -a ObjectManager:ObjectManager.cpp xml/object_manager.xml Got unknown type `a{oa{sa{sv}}}' You should add…
PhilBot
  • 748
  • 18
  • 85
  • 173
7
votes
2 answers

Error getting DBus Interface property with QDBusInterface

I am trying to get networking information (IP Address, Netmask, Route etc.) for all my interfaces in Qt using NetworkManager DBus interface. The problem is when I try to access the property "Addresses" of org.freedesktop.NetworkManager.IP4Config I…
Farrukh Arshad
  • 1,391
  • 2
  • 16
  • 26
7
votes
1 answer

Print out response of Dbus Method Call in C

The problem I am having is specifically printing out the response of a dbus method call in C using the low level API. I am new to C's libdbus, but have done some work in python-dbus. I know how to write dbus methods and method calls in python as…
NuclearPeon
  • 5,743
  • 4
  • 44
  • 52
7
votes
1 answer

Linux IPC selection?

I have two processes A and B. A and B needs to communicate (Bi-directional) sometimes for passing signals, messages etc. I have done some basic research about IPC's available in Linux like semaphore, message queues, dbus etc. Now I am in confusion…
duslabo
  • 1,487
  • 4
  • 20
  • 33
7
votes
2 answers

Start systemd service from C/C++ application or call a D-Bus service

I have a .service for a process that i don't want to start at boot-time, but to call it somehow from another already running application, at a given time. The other option would be to put a D-Bus (i'm using glib dbus in my apps ) service file in…
Cumatru
  • 695
  • 2
  • 12
  • 34
7
votes
2 answers

libvlc and dbus interface

I'm trying a to create a basic media player using libvlc which will be controlled through dbus. I'm using the gtk and libvlc bindings for python. The code is based on the official example from the vlc website The only thing I modified is to add the…
Vlad Balmos
  • 3,372
  • 19
  • 34
7
votes
2 answers

Calling DBus methods in Gjs / Gnome Shell

If I have a bus name, an object path, and an interface, how do I call DBus methods from Gjs (in a gnome-shell extension)? I'm looking for the equivalent of the following python code: import dbus bus = dbus.SessionBus() obj =…
jdm
  • 9,470
  • 12
  • 58
  • 110
6
votes
1 answer

is DBus what I'm looking for?

I need an IPC system on Linux. My requirements are: packet/message oriented ability to handle both point-to-point and one-to-many communication no hierarchy, there's no server and client if one endpoint crashes, the others must be notified good…
Lorenzo Pistone
  • 5,028
  • 3
  • 34
  • 65
6
votes
3 answers

Remotely shutdown/restart a Linux machine without password

I am writing a pyQt client-server application which restarts/shutdowns PCs remotely. The receivers are listening to the network for incomming messages, and the sender sends a restart/shutdown message to the selected receiver. The following part of…
kafedakias
  • 537
  • 1
  • 6
  • 10
6
votes
1 answer

.Service File D-Bus

I'm trying to auto-start a DBus service when my client program starts. I've setup a .service file, but it's not working. My service name is org.fandingo.PMP I register the name with a python server with name =…
fandingo
  • 1,330
  • 5
  • 21
  • 31
6
votes
1 answer

Dbus/GLib Main Loop, Background Thread

I'm starting out with DBus and event driven programming in general. The service that I'm trying to create really consists of three parts but two are really "server" things. 1) The actual DBus server talks to a remote website over HTTPS, manages…
fandingo
  • 1,330
  • 5
  • 21
  • 31
6
votes
3 answers

Passing a large data structure over dbus

I'm using dbus to communicate two programs. One creates a large image and it later sends it other program for further processing. I'm passing the image as ByteArray. With 2000x2000 images my program works, but with 4000x4000 it crasses with: process…
Sergio
  • 677
  • 1
  • 10
  • 20
6
votes
0 answers

How to avoid DBus for Linux in embedded environment?

I am working in a Linux based embedded project with C/C++ and python applications. And we need an Inter Process Communication (IPC) method to transport JSON based messages between those applications. Initially DBus was an obvious option since it is…
Gheorghe
  • 61
  • 1
  • 3