Choosing cross-distro DBus implementation












2















I'm trying to write a systemd daemon which should register new service in SDP, listen for RFCOMM connections and exchange some information with other Bluetooth devices. The daemon should be as distro-independent as possible. Since I want to use BlueZ5 I need to make use of DBus (which is new to me).



So here comes my question, will choosing GDBus make my daemon run only on systems with GNOME installed? Or similiarly, will QtDBus only work with KDE? If yes, what should I do to be able to run it on multiple distros?










share|improve this question


















  • 2





    IMO glib, gio libraries are the minimal dependency in any desktop distributions. So developing Bluetooth applications based on GDbus should not be a problem for any desktop. You can find some examples here : gist.github.com/parthitce and details here : linumiz.com

    – Parthiban
    Nov 17 '18 at 17:56
















2















I'm trying to write a systemd daemon which should register new service in SDP, listen for RFCOMM connections and exchange some information with other Bluetooth devices. The daemon should be as distro-independent as possible. Since I want to use BlueZ5 I need to make use of DBus (which is new to me).



So here comes my question, will choosing GDBus make my daemon run only on systems with GNOME installed? Or similiarly, will QtDBus only work with KDE? If yes, what should I do to be able to run it on multiple distros?










share|improve this question


















  • 2





    IMO glib, gio libraries are the minimal dependency in any desktop distributions. So developing Bluetooth applications based on GDbus should not be a problem for any desktop. You can find some examples here : gist.github.com/parthitce and details here : linumiz.com

    – Parthiban
    Nov 17 '18 at 17:56














2












2








2








I'm trying to write a systemd daemon which should register new service in SDP, listen for RFCOMM connections and exchange some information with other Bluetooth devices. The daemon should be as distro-independent as possible. Since I want to use BlueZ5 I need to make use of DBus (which is new to me).



So here comes my question, will choosing GDBus make my daemon run only on systems with GNOME installed? Or similiarly, will QtDBus only work with KDE? If yes, what should I do to be able to run it on multiple distros?










share|improve this question














I'm trying to write a systemd daemon which should register new service in SDP, listen for RFCOMM connections and exchange some information with other Bluetooth devices. The daemon should be as distro-independent as possible. Since I want to use BlueZ5 I need to make use of DBus (which is new to me).



So here comes my question, will choosing GDBus make my daemon run only on systems with GNOME installed? Or similiarly, will QtDBus only work with KDE? If yes, what should I do to be able to run it on multiple distros?







linux dbus bluez






share|improve this question













share|improve this question











share|improve this question




share|improve this question










asked Nov 17 '18 at 16:34









dluuugidluuugi

2314




2314








  • 2





    IMO glib, gio libraries are the minimal dependency in any desktop distributions. So developing Bluetooth applications based on GDbus should not be a problem for any desktop. You can find some examples here : gist.github.com/parthitce and details here : linumiz.com

    – Parthiban
    Nov 17 '18 at 17:56














  • 2





    IMO glib, gio libraries are the minimal dependency in any desktop distributions. So developing Bluetooth applications based on GDbus should not be a problem for any desktop. You can find some examples here : gist.github.com/parthitce and details here : linumiz.com

    – Parthiban
    Nov 17 '18 at 17:56








2




2





IMO glib, gio libraries are the minimal dependency in any desktop distributions. So developing Bluetooth applications based on GDbus should not be a problem for any desktop. You can find some examples here : gist.github.com/parthitce and details here : linumiz.com

– Parthiban
Nov 17 '18 at 17:56





IMO glib, gio libraries are the minimal dependency in any desktop distributions. So developing Bluetooth applications based on GDbus should not be a problem for any desktop. You can find some examples here : gist.github.com/parthitce and details here : linumiz.com

– Parthiban
Nov 17 '18 at 17:56












1 Answer
1






active

oldest

votes


















2














From the freedesktop wiki




The low-level libdbus reference library has no required dependencies;
the reference bus daemon's only required dependency is an XML parser
(expat). Higher-level bindings specific to particular frameworks (Qt,
GLib, Java, C#, Python, etc.) add more dependencies, but can make more
assumptions and are thus much simpler to use. The bindings evolve
separately from the low-level libdbus, so some are more mature and
ABI-stable than others; check the docs for the binding you plan to
use.




So you can be as platform independent as you want.



Parthiban's suggestion in the comments is probably your best bet, since even the libdbus developers recommend GDBus as the better option.



A nice overview of your options can be found here.






share|improve this answer





















  • 3





    You are correct. But using libdbus means If you use this low-level API directly, you're signing up for some pain (copied from dbus.freedesktop.org/doc/api/html)

    – Parthiban
    Nov 17 '18 at 17:43






  • 1





    Niall’s answer is good. You may find some additional detail on the differences between the different D-Bus client libraries here: stackoverflow.com/a/44696835/2931197.

    – Philip Withnall
    Nov 18 '18 at 12:59











Your Answer






StackExchange.ifUsing("editor", function () {
StackExchange.using("externalEditor", function () {
StackExchange.using("snippets", function () {
StackExchange.snippets.init();
});
});
}, "code-snippets");

StackExchange.ready(function() {
var channelOptions = {
tags: "".split(" "),
id: "1"
};
initTagRenderer("".split(" "), "".split(" "), channelOptions);

StackExchange.using("externalEditor", function() {
// Have to fire editor after snippets, if snippets enabled
if (StackExchange.settings.snippets.snippetsEnabled) {
StackExchange.using("snippets", function() {
createEditor();
});
}
else {
createEditor();
}
});

function createEditor() {
StackExchange.prepareEditor({
heartbeatType: 'answer',
autoActivateHeartbeat: false,
convertImagesToLinks: true,
noModals: true,
showLowRepImageUploadWarning: true,
reputationToPostImages: 10,
bindNavPrevention: true,
postfix: "",
imageUploader: {
brandingHtml: "Powered by u003ca class="icon-imgur-white" href="https://imgur.com/"u003eu003c/au003e",
contentPolicyHtml: "User contributions licensed under u003ca href="https://creativecommons.org/licenses/by-sa/3.0/"u003ecc by-sa 3.0 with attribution requiredu003c/au003e u003ca href="https://stackoverflow.com/legal/content-policy"u003e(content policy)u003c/au003e",
allowUrls: true
},
onDemand: true,
discardSelector: ".discard-answer"
,immediatelyShowMarkdownHelp:true
});


}
});














draft saved

draft discarded


















StackExchange.ready(
function () {
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fstackoverflow.com%2fquestions%2f53353221%2fchoosing-cross-distro-dbus-implementation%23new-answer', 'question_page');
}
);

Post as a guest















Required, but never shown

























1 Answer
1






active

oldest

votes








1 Answer
1






active

oldest

votes









active

oldest

votes






active

oldest

votes









2














From the freedesktop wiki




The low-level libdbus reference library has no required dependencies;
the reference bus daemon's only required dependency is an XML parser
(expat). Higher-level bindings specific to particular frameworks (Qt,
GLib, Java, C#, Python, etc.) add more dependencies, but can make more
assumptions and are thus much simpler to use. The bindings evolve
separately from the low-level libdbus, so some are more mature and
ABI-stable than others; check the docs for the binding you plan to
use.




So you can be as platform independent as you want.



Parthiban's suggestion in the comments is probably your best bet, since even the libdbus developers recommend GDBus as the better option.



A nice overview of your options can be found here.






share|improve this answer





















  • 3





    You are correct. But using libdbus means If you use this low-level API directly, you're signing up for some pain (copied from dbus.freedesktop.org/doc/api/html)

    – Parthiban
    Nov 17 '18 at 17:43






  • 1





    Niall’s answer is good. You may find some additional detail on the differences between the different D-Bus client libraries here: stackoverflow.com/a/44696835/2931197.

    – Philip Withnall
    Nov 18 '18 at 12:59
















2














From the freedesktop wiki




The low-level libdbus reference library has no required dependencies;
the reference bus daemon's only required dependency is an XML parser
(expat). Higher-level bindings specific to particular frameworks (Qt,
GLib, Java, C#, Python, etc.) add more dependencies, but can make more
assumptions and are thus much simpler to use. The bindings evolve
separately from the low-level libdbus, so some are more mature and
ABI-stable than others; check the docs for the binding you plan to
use.




So you can be as platform independent as you want.



Parthiban's suggestion in the comments is probably your best bet, since even the libdbus developers recommend GDBus as the better option.



A nice overview of your options can be found here.






share|improve this answer





















  • 3





    You are correct. But using libdbus means If you use this low-level API directly, you're signing up for some pain (copied from dbus.freedesktop.org/doc/api/html)

    – Parthiban
    Nov 17 '18 at 17:43






  • 1





    Niall’s answer is good. You may find some additional detail on the differences between the different D-Bus client libraries here: stackoverflow.com/a/44696835/2931197.

    – Philip Withnall
    Nov 18 '18 at 12:59














2












2








2







From the freedesktop wiki




The low-level libdbus reference library has no required dependencies;
the reference bus daemon's only required dependency is an XML parser
(expat). Higher-level bindings specific to particular frameworks (Qt,
GLib, Java, C#, Python, etc.) add more dependencies, but can make more
assumptions and are thus much simpler to use. The bindings evolve
separately from the low-level libdbus, so some are more mature and
ABI-stable than others; check the docs for the binding you plan to
use.




So you can be as platform independent as you want.



Parthiban's suggestion in the comments is probably your best bet, since even the libdbus developers recommend GDBus as the better option.



A nice overview of your options can be found here.






share|improve this answer















From the freedesktop wiki




The low-level libdbus reference library has no required dependencies;
the reference bus daemon's only required dependency is an XML parser
(expat). Higher-level bindings specific to particular frameworks (Qt,
GLib, Java, C#, Python, etc.) add more dependencies, but can make more
assumptions and are thus much simpler to use. The bindings evolve
separately from the low-level libdbus, so some are more mature and
ABI-stable than others; check the docs for the binding you plan to
use.




So you can be as platform independent as you want.



Parthiban's suggestion in the comments is probably your best bet, since even the libdbus developers recommend GDBus as the better option.



A nice overview of your options can be found here.







share|improve this answer














share|improve this answer



share|improve this answer








edited Nov 21 '18 at 14:52

























answered Nov 17 '18 at 16:56









Niall CosgroveNiall Cosgrove

1,1681922




1,1681922








  • 3





    You are correct. But using libdbus means If you use this low-level API directly, you're signing up for some pain (copied from dbus.freedesktop.org/doc/api/html)

    – Parthiban
    Nov 17 '18 at 17:43






  • 1





    Niall’s answer is good. You may find some additional detail on the differences between the different D-Bus client libraries here: stackoverflow.com/a/44696835/2931197.

    – Philip Withnall
    Nov 18 '18 at 12:59














  • 3





    You are correct. But using libdbus means If you use this low-level API directly, you're signing up for some pain (copied from dbus.freedesktop.org/doc/api/html)

    – Parthiban
    Nov 17 '18 at 17:43






  • 1





    Niall’s answer is good. You may find some additional detail on the differences between the different D-Bus client libraries here: stackoverflow.com/a/44696835/2931197.

    – Philip Withnall
    Nov 18 '18 at 12:59








3




3





You are correct. But using libdbus means If you use this low-level API directly, you're signing up for some pain (copied from dbus.freedesktop.org/doc/api/html)

– Parthiban
Nov 17 '18 at 17:43





You are correct. But using libdbus means If you use this low-level API directly, you're signing up for some pain (copied from dbus.freedesktop.org/doc/api/html)

– Parthiban
Nov 17 '18 at 17:43




1




1





Niall’s answer is good. You may find some additional detail on the differences between the different D-Bus client libraries here: stackoverflow.com/a/44696835/2931197.

– Philip Withnall
Nov 18 '18 at 12:59





Niall’s answer is good. You may find some additional detail on the differences between the different D-Bus client libraries here: stackoverflow.com/a/44696835/2931197.

– Philip Withnall
Nov 18 '18 at 12:59


















draft saved

draft discarded




















































Thanks for contributing an answer to Stack Overflow!


  • Please be sure to answer the question. Provide details and share your research!

But avoid



  • Asking for help, clarification, or responding to other answers.

  • Making statements based on opinion; back them up with references or personal experience.


To learn more, see our tips on writing great answers.




draft saved


draft discarded














StackExchange.ready(
function () {
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fstackoverflow.com%2fquestions%2f53353221%2fchoosing-cross-distro-dbus-implementation%23new-answer', 'question_page');
}
);

Post as a guest















Required, but never shown





















































Required, but never shown














Required, but never shown












Required, but never shown







Required, but never shown

































Required, but never shown














Required, but never shown












Required, but never shown







Required, but never shown







Popular posts from this blog

"Incorrect syntax near the keyword 'ON'. (on update cascade, on delete cascade,)

Alcedinidae

RAC Tourist Trophy