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.
1,290
questions
-1
votes
0
answers
8
views
failed to load external entity "http://www.oasis-open.org/docbook/xml/4.4/docbookx.dtd" when installing dbus
When trying to brew install starship using linuxbrew, a dependency dbus cannot be installed with the below message. brew install dbus ends up with the same error.
I/O error : Attempt to load network ...
0
votes
0
answers
18
views
Connect to the WPA2 WiFi network using C++ DBus Connman
Is it possible to connect to the protected network by its's SSID and password using C++ DBus library?
I could not find any similar code examples over the internet. I want to do something very similar ...
0
votes
1
answer
23
views
BlueZ D-Bus Media API: Is there any way to set the playback position?
I'm trying to build a bluetooth-receiver which can control the different media players on my smartphone (Spotify, Apple Music...) using the BlueZ D-Bus Media API:
https://github.com/pauloborges/bluez/...
0
votes
0
answers
12
views
TypeError: signal.<locals>.decorator.<locals>.emit_signal() missing 1 required positional argument: 'self'
I am broadcasting a signal from server and need to catch in client side but I don't know how to do it here is code and getting the error in server.
Objective : broadcasting the signal from server and ...
-1
votes
0
answers
20
views
networkmanager-strongswan not working in NixOS: DBUS binding failed
I have installed networkmanager-strongswan with the following code in /etc/nixos/configuration.nix:
# List services that you want to enable:
networking.networkmanager = {
enable = true;
plugins = [...
0
votes
0
answers
12
views
How to query if the active window is currently in Fullscreen mode? (Gnome/Wayland)
Is there any way to do this using DBus, or perhaps some Wayland-specific library such as pywayland?
0
votes
2
answers
26
views
What is the lifetime of bluetooth data on the system bus?
New to bluez & bluetooth. I have a few general questions about the management of data sourced from
a Polar sensor and written to the d-bus.
I'm working on a Jetson Nano that connects to a Polar ...
-1
votes
0
answers
24
views
mmcli: how to get first modem or first sim
I am using mmcli in scripts.
And it is really hard to identify the id of the modem or the sim.
this is a really complicated way to get the only sim id for example:
mmcli -m `mmcli -L -K | tail -n 1 | ...
0
votes
0
answers
21
views
Correct closing DBus connection
Could you explain how to close DBus connection correctly/ Below is my variant:
int P_dbus_proto_init(DBusConnection **dbus_conn, const char *name, dbus_MessageHandler mh, int num_rules, const char **...
0
votes
0
answers
28
views
BLE: WriteValue of GattCharacteristic doesn't get called
I followed the tutorial from The Bluetooth Technology for Linux Developers Study Guide (I skipped the 5th guide because I'm doing a gatt server), and everything worked fine until I got to Handling ...
0
votes
1
answer
44
views
NoReply Exception in DBUS communication
I'm working on an asynchronous communication script that will act as a middleman between a react native app and another agent. To do this I used python with DBUS to implement the communication between ...
0
votes
0
answers
22
views
How to target method with different name with QtDBus
I have a QObject as follows:
class MyClass : public QObject
{
Q_OBJECT
public:
MyClass(QObject);
void foo();
}
I have a DBus adapter as follows:
<!DOCTYPE node PUBLIC "-//...
0
votes
1
answer
35
views
GLib: how to quit main loop automatically started by g_initable_new()?
My excuses for the newbie question:
I used gdbus-codegen to generate a C-code D-Bus client proxy, running on a Yocto Linux embedded system. The generated code calls g_initable_new(), returning a ...
0
votes
0
answers
26
views
High CPU with dbus-daemon
Hi I have a dedicated server with ubuntu server 18.04 64 with very high cpu, run the htop command to check the processes and I saw one which causes it
1074 root 20 0 4483M 2083M 2160 S 1212 ...
-1
votes
0
answers
14
views
dbus running as root instead of messagebus
I'm using dbus for communication in my soc. During hard reset, sometimes dbus loads as root instead as messagebug. Which is causing my soc to restart. Can anybody help?
1
vote
1
answer
76
views
Method "Get" with signature "ss" on interface "org.freedesktop.DBus.Properties" doesn't exist
I am developing bluez and dbus software in python for automated testing purposes. Recently one of my methods: isconnected(), which checks the property "Connected" of all managed objects, has ...
0
votes
0
answers
17
views
Bluez: registering custom profile, deregistering and registering again throwing error
I am fairly new to Bluez and BLE Profiles, but am attempting to implement custom profiles for testing purposes. One of those is for example HFP.
My development and testing of the custom implementation ...
0
votes
1
answer
54
views
DBus Introspection incomplete/wrong
I'm trying to work with Bluetooth LE on a RPI4, and am following the Bluetooth® Technology for Linux Developers official guide. The python code works fine, but I have to do it in c++, and as of now, I'...
0
votes
1
answer
120
views
SOLVED: Bluez - Scanning and listing BLE profiles of devices before connection?
I'm quite new to bluetooth development, but currently working on building my understanding by developing some basic python scripts.
I'm using Bluez 5.58, python 3.9 and dbus.
So far, I am able to scan ...
0
votes
0
answers
46
views
Access user keyring from systemd hook or crontab
I'm trying to implement a systemd hook (systemd-sleep) to connect and disconnect from protonvpn. However, these scripts are executed as root and do not have access to the keyring. The backend is ...
2
votes
1
answer
495
views
How to unlock Gnome Keyring on Debian headless (WSL 2) and make it work in Python?
I have read the guindance that the keyring package has in its project for headless linux systems.
So the main recommendation is to install the gnome-keyring package in order to work with the Secret ...
0
votes
0
answers
39
views
Unable to make asynchronos call in dbus-python
import dbus
from dbus.mainloop.glib import DBusGMainLoop
from gi.repository import GLib
DBusGMainLoop(set_as_default=True)
dbus_loop = DBusGMainLoop()
loop = GLib.MainLoop()
bus2 = dbus.SystemBus(...
2
votes
1
answer
65
views
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', &...
1
vote
2
answers
214
views
How can I have a script executed just before the system goes to sleep?
How can I run a script in linux that can access kwallet, before the system goes to sleep?
Here I give more details:
I'm looking for a mechanism to execute a (user) script that runs before sleep/...
0
votes
1
answer
33
views
Check with sd_bus if reloading a process is successfull
i'm trying to check with sd_bus_get_property() if reloading for example nginx or php was successfull.
For that the properties "ActiveState" and "SubState" are interesting.
But if i ...
0
votes
0
answers
81
views
dbus-monitor - How to obtain variables data from `dbus-monitor`
For dbus-monitor --system "type='signal',sender='net.connman.iwd',interface='org.freedesktop.DBus.Properties',path='/net/connman/iwd/0/3',member='PropertiesChanged'"
I have
...
signal time=...
2
votes
2
answers
97
views
Receiving dbus signals with pythion
I'm trying to write some python to listen to signals.
Using dbus-monitor, as shown below, I can filter the signals I want.
dbus-monitor "type='signal',sender='org.kde.KWin',path='/ColorCorrect',...
0
votes
1
answer
59
views
How to set Powered property of /org/bluez/hci0 using sd_bus_set_property?
Recently I started to develop a bluetooth app using API exposed via D-BUS. After some research, I chose to use sd-bus library to communicate with D-Bus.
Here is my code:
#include <systemd/sd-bus.h&...
1
vote
1
answer
55
views
How to set Ipv4 addresses with dbus-python (Hotspot and ethernet)
(fairly new to networking)
I'm trying to setup a small, yet somewhat complicated network settings on my ubuntu 18.04 machine.
The topology of the network: Ubuntu machine (called "the server")...
2
votes
2
answers
200
views
Read dbus property with Python
I am trying to read the Bluetooth address of a Raspberry Pi from dbus. I can do it with busctl from the command line as detailed below, but the Python code that seems like it should run the same ...
0
votes
1
answer
44
views
Connect to 'PCMAdded' and 'PCMRemoved' signals of bluealsa (Qt)
I'm try to build a C++ application in Qt to capture audio streams from Bluetooth devices and play them to an ALSA playback device. This application runs in a Linux-embedded system and communicates ...
1
vote
1
answer
292
views
What is bluez "bluetoothctl scan on" (StartDiscovery) doing that "hcitool lescan" is not
I see its adding a file to /var/lib/bluetooth/hci MAC/cache/ for each discovered device with its name as the address. Documentation says its creating device objects. Where and what are they, virtual ...
1
vote
1
answer
157
views
Why am i Getting D-Bus argument type error?
I'm trying to invoke "Inhibit" method of org.gnome.SessionManager using D-Bus, but I'm getting no cookie in return and the following error:
Argument 0 is specified to be of type "uint32&...
3
votes
1
answer
101
views
Qt DBUS NetworkManager get Address from IP4Config interface
I have been using QtDBus and NetworkManager for a while but have run into a problem. I need to access the Wi-Fi devices IP address and the way to obtain it is to get the Wi-Fi device object, get its ...
0
votes
1
answer
141
views
Dbus Bluez Indicate Notification
In Dbus the interface for org.bluez.GattCharacteristic1 has an interface StartNotify(). This works fine with a callback defined. How do I enable notify with indicate?
1
vote
1
answer
77
views
How do I get the current page number from an open PDF document in Evince using DBus?
If I open a PDF document inside evince (GNOME Document Viewer), how do I get the current page number using DBus?
using zathura I could get the page number using the following command:
busctl get-...
0
votes
2
answers
86
views
Dbus-send how to get the number of pages from zathura?
I am trying to use dbus-send to get the total number of page from zathura (Zathura is a PDF viewer) (See figure below). I am not familiar with DBus (no matter how I try to learn it, I always give up).
...
0
votes
0
answers
17
views
DBUS Compile Error in dbus-launch.c when using SDK
I'm trying to compile dbus for my imx8-evk-mn
I'm working in a Linux Ubuntu VM. I've downloaded the source code from GitLab and installed all neccessary dependencies. When I execute make it compiles ...
0
votes
0
answers
156
views
Update system wide gsettings proxy settings on Ubuntu
Is there a way to get/set system wide gsettings? I'm trying to get/set proxy settings from a C++ program which is owned by root.
Currently within my program I'm making system calls to the following:
...
0
votes
1
answer
108
views
How to pass a DBus variant to Qt's QDBusInterface::call
I am trying to send the following message to Connman over Qt 5.12's DBus API:
dbus-send --system --print-reply --dest=net.connman / net.connman.Manager.SetProperty string:"OfflineMode" ...
0
votes
1
answer
119
views
No module named dbus - I already have that - Raspbian
I'm getting an ImportError "no module named dbus" when I reinstalled it
("sudo apt-get install --reinstall dbus")
It wrote me
"0 upgraded, 0 newly installed, 1 reinstalled, ...
0
votes
1
answer
38
views
Wrap sd_bus in single file descriptor
I'm writing a library which will use sd_bus under the hood. My goals are
Allow integration into any existing main loop (don't force a choice on clients)
Stable ABI
The ability to add more internal ...
0
votes
0
answers
24
views
dbus-java windows ---Cannot Resolve Session Bus Address
org.freedesktop.dbus.exceptions.DBusConnectionException: Cannot Resolve Session Bus Address
at org.freedesktop.dbus.connections.impl.DBusConnection.getSessionConnection(DBusConnection.java:241)
at org....
0
votes
0
answers
289
views
dbus.exceptions.DBusException: org.freedesktop.DBus.Error.LimitsExceeded
Using D-bus am trying to automatically connect raspberry pi with mobile through Bluetooth, it works fine for 265 times but again when I try I get an error
I created a file /etc/dbus-1/session-local....
0
votes
0
answers
218
views
Ble dbus python: advertise ServiceUUIDs information
Background: I want to use ble for server/client software. But in this case, the server should be the peripheral with multiple connections. For that i start multiple services, up to 10. I think that's ...
1
vote
1
answer
75
views
zbus connection not displayed in busctl list
I'm using the zbus crate to make a server able to get events from the dbus.
It works well my code (basically the same as the example from the documentation) is able to receive events so it's fine.
I ...
0
votes
0
answers
243
views
Call a dbus method in C++
I want to call the method Refresh of the org.freedesktop.UPower.Device interface using dbus in my C++ code. But I couldn't figure it out myself. Can someone briefly explain using dbus in a C++ program?...
0
votes
0
answers
227
views
dbus-monitor is working but problem with Python dbus (Python 3.10)
dbus-monitor interface=org.freedesktop.Notifications
is working fine on Fedora 35. it prints all info when receiving a gnome notification.
So, I'm trying to catch dbus notifications with python:
Using ...
0
votes
1
answer
86
views
Catching and responding to the Connman 'RequestInput' method call with QtDBus
I'm building a simple Qt-based application for monitoring and connecting to WiFi networks. I'm interfacing with Connman via its D-Bus APIs, and am able to scan for available networks, turn on/off ...
3
votes
3
answers
516
views
Connecting to user dbus as root
If we open a python interpreter normally and enter the following:
import dbus
bus = dbus.SessionBus()
bus.list_names()
We see all the services on the user's session dbus. Now suppose we wanted to do ...