1,440
questions
1
vote
1
answer
57
views
Value does not live long enough in main [closed]
While writing some Rust, I've run into an issue with this code:
fn main() {
let session = Connection::new_session().unwrap();
let manager = DBusManager::new(&session);
let tray = ...
0
votes
0
answers
26
views
Flutter application built with snapcraft using file_picker not showing dialog
I've built a Flutter application that works perfectly on Windows, Linux and Android. However, when I compile and run the code as a snap package, the file dialog windows do not appear.
The dialogs use ...
1
vote
1
answer
30
views
PyQt D-BUS add multiple output arguments to the method
I want to add several output arguments in a PyQt5 D-BUS method. I cloned the example from qt example. In class CarInterfaceAdaptor, I added a new method control which has three output arguments: speed,...
0
votes
0
answers
23
views
how to extract the substates from sdbus-cpp onsignal call
I have put up a demo code to monitor the ssh service signals & to take action when the substate is dead
.SubState property s "running" ...
0
votes
2
answers
47
views
dbus RequestScan Method in python
I'm trying to reverse engineer this sample code I found online which i don't understand. As I understand it, the code returns the SSID's that my wlan0 device finds.
What troubles me, is the list of ...
0
votes
0
answers
47
views
how to inspect locally running BLE GATT server on Ubuntu Linux using D-bus?
I am using following sample code:
example-gatt-server for testing purpose.
Example:
-> In this code we have registered Service: HeartRateService which has multiple Characteristics as: ...
0
votes
1
answer
53
views
'RequestInput' Callback in sdbus-c++ Triggered After Connection Timeout
I'm writing code to connect a particular Wi-Fi device using Connection Manager and sdbus-c++. When calling the Connect function, the system asks for a password via RequestInput. The password is ...
1
vote
1
answer
30
views
How to read string property from DBUS_TYPE_VARIANT?
I have a small Qt app I use dbus to set "org.freedesktop.login1.Session", "SetBrightness" to control the backlight for a laptop display. As part of the program I write the current ...
1
vote
1
answer
35
views
EOFError when trying to call Inhibit method on org.freedesktop.login1.Manager via dbus-fast
I'm developing a Python application which will be distributed to users on Linux in various forms (Flatpak, PyInstaller executable, maybe others). In this application, I want to call the Inhibit method ...
2
votes
1
answer
105
views
What causes inter-process communication to take millions of cycles?
In the best case, Inter-process communication is obviously slower than communication between threads, as threads share resources, such as the heap.
However, why is inter-process communication several ...
2
votes
1
answer
70
views
Secure communication between a daemon and D-Bus on Linux
So I have a daemon which is used to authenticate users via Azure Entra Id (the daemon is Himmelblaud). I'm writing a session D-Bus service (the bare bones here) to provide SSO creds to various apps ...
1
vote
0
answers
53
views
How do you add complex types with Qt DBus in Qt5/6
For background:
I'm writing a program that listens for the creation of new IPv4 Config objects in NetworkManager and gets the DHCP-provided gateway and nameservers from the properties of the object. ...
0
votes
1
answer
112
views
I am getting error that dbus package is not installed in virtual env
I am using virtual env to run my program, but it show this error every time I run my code:
UserWarning: The Python dbus package is not installed.
Try installing it with your distribution's package ...
1
vote
0
answers
63
views
How to get an inhibitor lock for a service in C language?
I am making a service and I need to know when the system is about to shutdown, in order to perform a last action and finish the service.
Following Inhibitor Locks documentation (Taking Delay Locks) I ...
1
vote
1
answer
71
views
Trying to access Inkscape from d-bus fails (but works with Gio)
I am trying to use dbus to drive Inkscape from scripts
This code - which I got from here - works ok:
# Start after inkscape is running.
print ("DBus test")
import gi
gi.require_version(&...
0
votes
2
answers
58
views
String representation of GVariant
Is there a function to parse a generic glib GVariant pointer into a const char*?
Such as the way it's done in DBus?
signal time=1717768489.237441 sender=:1.22 -> destination=(null destination) ...
1
vote
1
answer
63
views
How to handle Bluetooth pairing passkey confirmation using sd-bus in C?
I'm developing a Bluetooth application for an embedded device on Ubuntu. I'm using the sd-bus library to pair a Bluetooth device with a given MAC address. The code I've written successfully initiates ...
1
vote
2
answers
109
views
How to pass sba(sv) arguments via qdbus
I'm having a problem with qdbus. I need to pass sba(sv) to the SetUnitProperties method.
I am only able to pass sba{sv} by using a dictonary. I can't find any documentation or examples on how to pass ...
0
votes
1
answer
77
views
Reconnecting to Dbus daemon after a failover from an application written in vala
I have an application written in vala which communicates to another process (written in vala) using dbus-daemon. It works fine. But it fails to communicate after dbus-daemon is restarted.
My ...
0
votes
1
answer
48
views
How to display the bluetooth devices near a raspberry pi for a limited amount of time?
I would like that the following script runs for a certain time (let's say 10 sec) e lists the available bluetooth devices near a RaspBerry Pi 4.
When I run the following script (adapted from this ...
0
votes
1
answer
126
views
Getting DBus notifications of systemd service crashes?
I have linux application that consists of multiple processes, one of them is a "supervisor" process that takes actions if the others crash. All of the processes in the application are ...
0
votes
1
answer
32
views
Only trusted callers (e.g. uid 0 or an action owner) can use CheckAuthorization() and pass details
The program didnt give an error until the key polkit.message was added to to self.details. is there a way to pass the message without getting the error?
code:
class LinuxLocalAuth:
def __init__(...
1
vote
0
answers
126
views
Getting screenshots and title/application name of a window in ubuntu 22.04 wayland
There is a Linux application that collects activities in the current GUI session: once every time it takes a screenshot of the screen and writes down the name (title) of the window that is in focus ...
1
vote
0
answers
66
views
Get result from Eval gnome dbus API method
I'm using the Eval method from the gnome dbus API to get the name of the window that is currently in focus. https://gitlab.gnome.org/GNOME/gnome-shell/-/blob/main/data/dbus-interfaces/org.gnome.Shell....
0
votes
1
answer
142
views
Take screenshot in gnome environment via its dbus api
I'm trying to take a screenshot using the gnome dbus api https://gitlab.gnome.org/GNOME/xdg-desktop-portal-gnome/-/blob/main/data/org.gnome.Shell.Screenshot.xml
#include <stdbool.h>
#include <...
0
votes
0
answers
44
views
Calling a method from gnome service via dbus
I want to contact gnome via dbus and use the Screenshot method from here https://gitlab.gnome.org/GNOME/xdg-desktop-portal-gnome/-/blob/main/data/org.gnome.Shell.Screenshot.xml
I use the c API for ...
1
vote
0
answers
58
views
DBus get stuck on compositor start
We use a Wayland compositor written in Qt5 to start and show some other applications written in Qt5 on an embedded Linux display computer.
All the applications and the compositor are using the DBus, ...
0
votes
0
answers
447
views
python-dbus: org.freedesktop.DBus.Error.AccessDenied: Cannot access system DBUS over Python on Linux
I am trying to create a Python script that I can run as a user systemd service on a Raspberry Pi running Raspberry Pi OS Bookworm. The script's purpose is to listen to system DBUS messages coming from ...
0
votes
0
answers
63
views
Error when calling new operator - malloc.c:2379
I am trying to create a dbus proxy using a MyDBUS library I have been assigned
The problem is, when I try to do new MyDBUS() the program stops and a malloc error comes out on the screen output, before ...
1
vote
1
answer
56
views
IPC between non-isolated and isolated CPUs
I have 2 CPUs - cpu1 and cpu2. Process A (non-real-time) runs on cpu1, Process B (real-time) runs on cpu2. I want to isolate cpu2 from the Linux scheduler by using isolcpus or tuned-profiles-realtime. ...
0
votes
0
answers
136
views
Bluez - BLE trouble connecting to BT dual mode devices
I have two devices running Bluez in linux. I'm writing a C application using GDBus and bluez v5.54. The application is a sample app meant to demonstrate how to write code for bluetooth low energy.
I ...
0
votes
0
answers
34
views
I tried to register agent to connect with private network but not working [DBUS-CONNMAN-DART]
static Future<void> RegisterAgent(DBusObjectPath path) async {
var introspectable = OrgFreedesktopDBusIntrospectable(dbus, 'net.connman', DBusObjectPath('/'));
try {
await ...
0
votes
1
answer
221
views
sdbus-c++: client doesn't react to signals from server
I'm trying to create the daemon without UI and GUI-app that will configure it. This app should to send commands to daemon and display updated info. I'm trying to use DBus for it and sdbus-c++ library.
...
-2
votes
1
answer
63
views
std::unique_ptr<DBusMessage> != nullptr after move into function parameter
I'm trying to write a program that uses DBus to interact with BlueZ. From the information I have been able to gather from the DBus docs, BlueZ DBus API docs, and various forums, my thought process was ...
2
votes
1
answer
36
views
Do I have to keep the caller of DBus.Client.export alive for as long as I want the exported interface at the object path to work?
If not, what keeps alive the functions I export to implement the interface?
I am implementing a notification server in Haskell, and at the moment I have something like this,
startServer :: IORef ...
0
votes
1
answer
25
views
Is it even possible to write a notification server that fully conforms to the desktop notification specification (DNS)?
As far as I've understood, some programs that send notifications, will call Notify once with replaces_id = 0 in order to get an ID assigned, and on next calls to Notify, they'll provide that ...
0
votes
0
answers
53
views
Why does my D-Bus signal, implemented with Python dasbus library, not show up?
I'm trying to implement a simple D-Bus server mock using the dasbus library. I need to implement a D-Bus signal with a specific signature for testing purposes.
Could somebody please help me and give ...
0
votes
0
answers
58
views
Writing value to GATT characteristic via DBUS results in "garbage" value during subsequent read
I'm attempting to write values to a GATT characteristic using DBUS, however when I read back the value of the characteristic, it's not the value that I just wrote.
For example, using the following ...
0
votes
0
answers
50
views
Connect wifi service with dbus-native
I am working on a project in the Node.js environment that via dbus-native interfaces with Connman. What I need to do is create some code that allows it to connect to a secure wifi network. I went to ...
0
votes
2
answers
118
views
Parsing DBUS response type as Array of Dictionary or Map using C++
I am working on Linux DBUS APIs using C++ code, trying to run a dbus method and parse response message typeof (a{sv}) But having few problems. I am using glib and glibmm libraries.
here is my code:
...
0
votes
1
answer
596
views
How can I trigger shutdown or logout in KDE Plasma via QDbus in Python?
A KDE Plasma session can be given the signal to log out using the following in a terminal window:
qdbus6 org.kde.Shutdown /Shutdown org.kde.Shutdown.logout
or simply
qdbus6 org.kde.Shutdown /Shutdown ...
1
vote
1
answer
75
views
Zbus create proxy builder without destination
How do i set a null desination using zbus? I want to recieve a signal that has a (null desination) but the ProxyBuilder doens't allow me to do this.
This is how I'm sending the signal. dbus-send --...
0
votes
1
answer
74
views
Am I wrong or Dunst+notify-send violates the Desktop Notification Specification?
In the Desktop Notification Specification? I read that
If replaces_id is 0, the return value is a UINT32 that represent the notification. It is unique, and will not be reused unless a MAXINT number ...
1
vote
1
answer
161
views
Python DBus unknown method or interface
I'm following a study guide for Bluetooth development for Linux found here, and am new to DBus programming.
The guide uses Python to interact with the System DBus as follows.
#!/usr/bin/python3
import ...
1
vote
0
answers
51
views
Unable to Parse Dictionary Response in sd_bus_message_read() After Successful String Retrieval
I'm trying to retrieve track details from a connected Bluetooth device using the org.bluez.MediaPlayer1 interface in the object "/org/bluez/hci0/dev_3C_19_5E_F9_26_60/player0" of org.bluez.
...
1
vote
1
answer
100
views
Having trouble toggling Bluetooth functionality using sd-bus in C
I'm currently working on a project where I need to control Bluetooth functionality using sd-bus. I'm relatively new to sd-bus and would appreciate some assistance.
Specifically, I'm trying to write C ...
4
votes
1
answer
145
views
What are the known pitfalls of periodic vs continuous Bluetooth device discovery in Bluez/Linux?
I'm developing a BLE smartwatch companion app for Linux, and it needs to automatically reconnect to the selected device whenever it's in the range. My naive implementation just starts the device ...
0
votes
0
answers
227
views
Client in BLE for raspberry Pi 4 using BlueZ
The example server and client provided at the BlueZ github do not work (I tested them both on two raspberry PIs, one with client and one with server). I tried first the server with the nRF Connect app ...
1
vote
1
answer
62
views
How can I make my D-Bus service exit automatically when idle?
I have a D-Bus service written in Python with GDBus (using bindings provided by PyGObject).
Since it's written in Python and has a few dependencies, that service has a relatively big memory footprint (...
2
votes
1
answer
62
views
Why do I get "Unexpected reply type" from notify-send when using this Haskell notification server?
In my intentions, the code below is a work-in-progress¹ Haskell notification server.
However, even with respect to these unpretentious intentions, the program has a bug that I don't understand.
Here's ...