Linux - SoftwareThis forum is for Software issues.
Having a problem installing a new program? Want to know which application is best for the job? Post your question in this forum.
Notices
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
I recently switched from Xfce/GNOME2 to window managers, thus having no longer need in dbus (it's Debian, so I still have a dbus library but not the daemons). I wonder, what are advantages of using dbus.
Let me explain: to change preferences/look of a window manager (or any other programme that doesn't use dbus; xterm for example) one has to edit its configuration file(s). And to change, say, xfwm4/metacity theme (font, etc.) one has to type a command (xfconf-query...), apart from GUI configuration manager, of course, OR to change XML config files manually, but, without dbus running, settings won't work.
So, why don't then these environments (GNOME, KDE, Xfce) only rely on plain text config files for managing their components without need in dbus?
From the same developers as systemd... Dbus originally was just another inter-process communication method that allowed addressing (like rpc services do, but using a different addressing scheme). The developers wormed it into being used for anything and everything. It is embedded in systemd as well. It has been used to pass audio around, configuration options, system daemon to user notifications...
Personally, I prefer simple text files (even XML is overkill, and hard to read as well; so suddenly you get yet another GUI editor for those files...).
One of the issues dbus does address is to separate the X resource database portion of the X server (which still exists) from the X server. This is not necessarily a bad thing, but it does force yet another authentication and authorization problem with X applications working remotely (the "can't contact dbus" is due to the addressing failure between a remote application and the local resource definitions...), which makes some gnome tools act odd.
The problem this causes is that it becomes a problem for the Mate desktop as the Mate toolkit libraries have been being migrated to qt3 (which is a gnome3 library where the dbus connections get involved). Trying to use some of those tools remotely causes problems.
From the same developers as systemd... Dbus originally was just another inter-process communication method that allowed addressing (like rpc services do, but using a different addressing scheme). The developers wormed it into being used for anything and everything. It is embedded in systemd as well. It has been used to pass audio around, configuration options, system daemon to user notifications...
Personally, I prefer simple text files (even XML is overkill, and hard to read as well; so suddenly you get yet another GUI editor for those files...).
One of the issues dbus does address is to separate the X resource database portion of the X server (which still exists) from the X server. This is not necessarily a bad thing, but it does force yet another authentication and authorization problem with X applications working remotely (the "can't contact dbus" is due to the addressing failure between a remote application and the local resource definitions...), which makes some gnome tools act odd.
The problem this causes is that it becomes a problem for the Mate desktop as the Mate toolkit libraries have been being migrated to qt3 (which is a gnome3 library where the dbus connections get involved). Trying to use some of those tools remotely causes problems.
D-Bus is, by the way, maintained by Red Hat. I see some similarities with systemd as well. But D-Bus has been here for long time and I have never really questioned, why should I use it, unlike with systemd case. It's another topic though.
As far as I know, systemd's dbus (sd-bus) is another implementation, like GDBus and QtDBus, built on top of it.
I had some problems with dbus, in particular with permissions and policykit (unable to shutdown and mounting volumes, it was in Xfce and Mate). gvfs is another huge thing, of which I am a bit uncertain.
Mate uses gtk+2, no? Last time I used it was 1.8 though, but since it's "enhanced GNOME2," I reckon, they'll be using it.
Mate is moving to gtk3 (http://wiki.mate-desktop.org/status:gtk3), though the project hasn't finished. The advantage for the project is not having to maintain the gtk2 libraries anymore. The disadvantage to the users is that it will come with a good bit of the gnome3 baggage originally avoided.
There is only one dbus - the others are interface libraries added to access it.
Part of gvfs is now missing (the user fuse mount for the gnome configuration), at least in Fedora (but them I'm using gnome2, but see things like gvfsd, gvfsd-http, gvfsd-metadata,.... So it appears to be reimplemented on the /run/user/<uid>/gvfs things that get wiped out on logout. At least backups don't seem to have a problem with it now.
I received a reply, regarding D-Bus, on Xfce forums that is worth sharing, I suppose.
Quote:
Originally Posted by ToZ
dbus is mostly an interprocess communication (IPC) system - a way for applications to talk to each other. For example, xfce4-power-manager uses dbus for:
Quote:
...xfce4-power-manager provides a set of freedesktop-compliant DBus interfaces to inform other applications about the current power level so that they can adjust their power consumption, and it provides the inhibit interface which allows applications to prevent automatic sleep actions via the power manager; as an example, the operating system’s package manager should make use of this interface while it is performing update operations.
xfconf (Xfce's configuration storage system) uses dbus so that it can communicate with other Xfce applications when settings are queried and/or changed and need to be tracked/saved.
Xfce, however, uses xfconf as sort of a "live" configuration management system. On startup, the settings in the xml files are read into memory and managed by the xfconfd daemon. It tracks when configuration changes are made and on shutdown, it writes these changes back to the xml files. It saves the user from having to directly manipulate those files.
Last edited by Mitt Green; 02-25-2016 at 03:30 PM.
You need it only because applications use it. There ARE alternative communications methods. Domain sockets are used for dbus... so dbus itself isn't required, just that the applications use it instead.
Which is more complex to use? Personally, it looks like dbus is.
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.