Questions tagged [gdbus]

Tool for working with D-Bus objects

Simple tool for working with D-Bus objects: More info: manual

102 questions
3
votes
1 answer

Is there a way to check if someone listens to dbus signal?

Is there a way to check for listening clients in DBus? Is it even possible to do? I'm using gdbus. Background I'm creating service which interfaces with serial ports and I want to implicitly open serial ports if someone is listening and…
3
votes
1 answer

call DBus method using GDBus in gjs, no output?

I would like to write a gnome-shell extension, which involves some dbus calling in gjs. I have learned that Gio.DBus is the right module to use, but I failed to make it run correctly. To demonstrate what I mean, I prepared the following "incorrect"…
K.Chen
  • 1,166
  • 1
  • 11
  • 18
2
votes
1 answer

C++ GDBus. Bluetooth service registration and getting out of the loop

I need to register bluetooth service on Linux PC in C++ and so far, I am able to do it with such code: (taken and shorthened from here). #include #include #include #define SERIAL_PORT_PROFILE_UUID…
Alvov1
  • 157
  • 1
  • 2
  • 10
2
votes
1 answer

How to properly compile and link a gdbus program

I am trying to learn dbus and compilation/linking of programs on Linux. I am fairly new to building and linking applications from scratch. To this end, I am creating a simple client+server applications on Ubuntu which communicate over gdbus. I am…
Moon_Raven
  • 309
  • 2
  • 12
2
votes
0 answers

gdbus introspect with --recurse AND --xml options together do not recurse

I would like to recursively explore an interface with the --recurse gdbus introspect --system --dest "org.fedoraproject.FirewallD1" --object-path "/org/fedoraproject/FirewallD1" --recurse add out put the result as XML with the --xml option gdbus…
2
votes
1 answer

Can't set SSP mode in Bluez through DBus

I need to change the Secure Simple Pairing mode programmatically, but I can't figure out how to set SSP mode on or off in Bluez using a DBus command. Using btmgmt utility, I just do: btmgmt ssp off btmgmt ssp on Ok, but what I need is rather DBus…
Bludzee
  • 2,733
  • 5
  • 38
  • 46
2
votes
1 answer

D-Bus method not found at object path despite the fact that method exist

I implement an app with this com.example.appname.desktop file as follows: $ cat /usr/local/share/applications/com.example.appname.desktop [Desktop Entry] Version=1.0 Terminal=false Type=Application Name=appname Exec=/opt/app/appname…
JamesWebbTelescopeAlien
  • 3,547
  • 2
  • 30
  • 51
2
votes
1 answer

Registering a signal handler with wpa_supplicant p2p DBus interface

I'm running into issues trying to register to receive the "InvitationReceived" signal from wpa_supplicant's dbus interface for p2p using the gdbus library in C. I can create a proxy connection to the P2P dbus interface just fine and call methods on…
xgord
  • 4,606
  • 6
  • 30
  • 51
2
votes
1 answer

systemd resource control SetProperties with gdbus at runtime

I have a systemd foo.slice with cgroup setting CPUShares. My idea is to change the setting at certain point during the system startup, which will be triggered by a systemd service. I do some test work to check how to change the setting at…
Shuangistan
  • 1,053
  • 8
  • 20
2
votes
1 answer

Replacing Gnomes virtual keyboard with Onboard -> Hide/Show via DBus doesn't work

I'm using Gnome on a tablet as a daily driver. The integrated virtual keyboard doesn't serve as a replacement for a real keyboard, but I need exactly that. Thus I want to replace it with Onboard, and started to write an extension for Gnome Shell.…
schuhumi
  • 51
  • 1
  • 5
2
votes
5 answers

Add fds in the GLIB mainloop

I need to attach file descriptors to the GLIB mainloop. My issue is that the list of file descriptors is not fixed during execution. According to GLIB documentation, I can: create a GIOChannel for each FD using g_io_channel_unix_new and attach it…
amenophiks
  • 73
  • 2
  • 6
2
votes
1 answer

Static Analysis Tools for GLib and GDBus

Does anyone know of any tools or techniques for detecting memory leaks when using GLib and GDBus? I am relatively new to using both libraries and believe I am using the API's correctly, but it would be great if there was a tool that I could use to…
waffleman
  • 4,159
  • 10
  • 39
  • 63
1
vote
1 answer

How to set parameters of Mpris SetPosition method

I currently working on controlling VLC player via DBUS. VLC implements MPRIS. There is a method which is named SetPosition of the MPRIS to set the position of the player. It has the following signuture. SetPosition (o: TrackId, x: Position) I…
şahin
  • 19
  • 3
1
vote
0 answers

Migrating code from deprecated dbus-glib to GDBus

I have been working to update some old code that uses the deprecated dbus-glib DBUS binding for Glib. The idea is to use GDBus instead. Here is the original code: ` static gpointer afpstats_thread(gpointer _data) { DBusGConnection *bus; …
dgsga
  • 11
  • 2
1
vote
0 answers

Unable to initialize GDBusConnection with cellular modem on linux

I am currently trying to access cellular modem data from within a C application on Linux using mmlib-glib. When trying to establish a GDBusConnection on a GFileIOStream created from a GFile from path /dev/cdc-wdm0, the call to…
sasukenebe
  • 21
  • 3