Questions tagged [qtdbus]

The QtDBus module, part of the Qt framework, is a Unix-only library that you can use to perform Inter-Process Communication using the D-Bus protocol.

D-Bus is an Inter-Process Communication (IPC) open-source system for software applications to communicate with one another. QtDBus simplifies the use of D-Bus in Qt applications. A QtDbus quick tutorial is here.

56 questions
22
votes
8 answers

How solve ImportError: No module named 'dbus'?

I have installed anaconda4 on my ubuntu and I have these modules on my Python: dbus-python (1.2.4) gi (1.2) pydbus (0.2) QtAwesome (0.3.2) qtconsole (4.2.0) QtPy (1.0) sip (4.18) I tried installing dbus-python (1.2.4) and pydbus (0.2), however,…
B nM
  • 369
  • 1
  • 5
  • 17
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
7
votes
1 answer

Unable to autolaunch a dbus-daemon without a $DISPLAY for X11

I have a QT/C++ terminal application which binds to D-Bus, but when I attempt to bind on the session bus I'm getting the following error: "Unable to autolaunch a dbus-daemon without a $DISPLAY for X11" This is just a simple terminal application,…
RandomUser
  • 4,140
  • 17
  • 58
  • 94
6
votes
1 answer

Can we generate abstract Qt D-Bus adaptor classes?

I'm using the qdbusxml2cpp tool to generate a D-Bus adaptor class for my D-Bus server. However, it has the following drawbacks: Code is generated once, and then you're not supposed to modify it. But what if we have to make changes (see below) and…
Thomas
  • 174,939
  • 50
  • 355
  • 478
6
votes
3 answers

How do I extract the returned data from QDBusMessage in a Qt DBus call?

I'm trying to call WPA supplicant's DBus interface using Qt's QDBus class library. In particular, I'm trying to use the "Get" property call to retrieve the "Interfaces" property value. The DBus specification (via introspection) for "Get"…
MatthewD
  • 2,509
  • 2
  • 23
  • 27
5
votes
1 answer

how to expose methods on system bus using Qtdbus

I want to expose methods of my application on System bus using Qt Dbus in Qt Creator. while using session bus ,the methods get exposed, but with system bus I am only able to see the Service name with which i registered but no methods to be exposed…
Jenny
  • 71
  • 5
5
votes
1 answer

How is the “car.xml” file from dbus example called “D-Bus remote controlled car example” generated?

I am trying to create programs that take advantage of the D-Bus. I’ve studied the examples supplied with Qt about the same. In one of them called “D-Bus remote controlled car example” there is a file named “car.xml” with following content:
max
  • 2,627
  • 1
  • 24
  • 44
5
votes
2 answers

QtDBUS: Send Enums over DBUS

I'm using qt dbus binding in c++. Currently I'm able to send any custom types (e.g.: class, structs) over dbus but I am not able to send an enumeration. I also tried this link here, but I do not get it
MeJ
  • 1,088
  • 10
  • 18
3
votes
1 answer

How to call a D-Bus interface from Qt with struct argument

I'm trying to ask polkit for authorization but I can't seem to find out how to provide a struct as an argument. QDBusArgument subject; subject.beginStructure(); subject << "unix-process"; subject << QMap{ {"pid",…
Rikudou_Sennin
  • 1,357
  • 10
  • 27
3
votes
0 answers

What does org.freedesktop.DBus.NameLost mean?

I'm getting org.freedesktop.DBus.NameLost signal when my application tries to invoke DBus activatable session bus service. What does this signal really means? Does this mean application cannot send signal to the DBus service anymore? Request method…
JamesWebbTelescopeAlien
  • 3,547
  • 2
  • 30
  • 51
3
votes
2 answers

QtDbus is not working in Qt5.4.1 on Windows 7

When I run the Qt Creator dbus examples, they couldn't run, is there any settings or stuff for working QtDbus module or any prerequistics? for example in chat project: if (!QDBusConnection::sessionBus().isConnected()) { qWarning("Cannot connect…
Reza Ebrahimi
  • 3,623
  • 2
  • 27
  • 41
3
votes
1 answer

Fatal error when trying to get a DBus property with custom type

I'm trying to interface UDisks2 with a Qt application, and reading a custom property crash the program. For SMART attributes, everything is OK (including the custom properties), but when I try to read the RAID devices property ActiveDevices I get a…
Michaël Lhomme
  • 346
  • 1
  • 8
3
votes
1 answer

How to use QDBusPendingCallWatcher properly?

I'm trying to use QDBusPendingCallWatcher to watch an async call. Some sample code like this: { // interface = new QDBusInterface(...); QDBusPendingCall pcall = interface->asyncCall("query"); QDBusPendingCallWatcher *watcher = new…
keichi
  • 33
  • 3
3
votes
1 answer

How to return error to dbus using qt-dbus?

I'm using qt-dbus to expose some API from my software. I convert foo.xml with interface declaration to foo_adaptor.cpp and foo_adaptor.h holding FooAdaptor class via qdbusxml2cpp, then I bind real Foo class to the FooAdaptor by calling new…
bitfield
  • 83
  • 5
2
votes
1 answer

PyQt5: How to get/set properties using QtDBus

I'm trying to communicate with SMPlayer using its D-Bus interface "org.mpris.MediaPlayer2". Calling methods works fine. For example: smp = QDBusInterface(r'org.mpris.MediaPlayer2.smplayer', "/org/mpris/MediaPlayer2",…
Stefan
  • 43
  • 7
1
2 3 4