Why do we need d-bus?

I've never quite understood what d-bus is for and what it does. What kind of things wouldn't work without it?

I have personally never went out of my way to enable it programs like chrome or firefox always start the session anyways, someone told me it's a security concern, is that true?

edit: when i say the 'freebsd' desktop i mean a desktop without linuxisms
 
Last edited:
I see it is called a Linuxism by those here but is still a staple of any bsd desktop. why?
from what i can see the only os that makes it easy to make dbus fuck off from chrome and ff is gentoo
 
It's not exactly hard to look it up IMO, this could be a good read: https://en.wikipedia.org/wiki/D-Bus

Also, you speak of "BSD desktop", something like that doesn't exist. By default FreeBSD doesn't use a desktop but the command line. However... X environments such as KDE rely on D-Bus. Why? Well, see the link or go ask them ;) In the end it has little to do with (Free)BSD but more so with the X desktop environments which rely on it.
 
I've never quite understood what d-bus is for and what it does. What kind of things wouldn't work without it?
Because most of the applications, graphical or even cli, make use of it. If you want to use them, you need it. Done.
 
Yaah, dbus does inter-process communication. It's an alternative to the classic ways to do this (pipes, sockets, shared memory..).

Each time you launch a gtk3 based GUI programm, dbus processes will spawn. It's probably the same with qt5.
Dbus cannot be turned off in gtk3, even if it's not needed (I think there is a PR somewhere trying to fix this.). Anyways,
since dbus is used in gtk3 and qt5, many desktop systems will have dbus processes spawning. An exception is a super leightweight window manager, e.g. openbox. But even in openbox, once you start a GUI programm, chances are high that dbus is launched as well...
 
I've never quite understood what d-bus is for and what it does. What kind of things wouldn't work without it?
Me neither - given that the internals stay obscure.
It's not exactly hard to look it up IMO, this could be a good read: https://en.wikipedia.org/wiki/D-Bus
This does mostly talk about theoretical concepts - it does not explain how the thing would actually achieve that (and therefore compromise the system).

So, what we know is: we are forced to compile that d-bus into application. And, since some couple of months, we are also forced to install it.

We also know: it does not run any processes.

The question then is: how does it achieve what it is explained to achieve? Which kind of IPC does it use, and how does that work? And can it be monitored? (Because, if two entities want to talk to each other on my system, I would like to know about that. Thats why I am running a defined system and not a linux madhouse.)
Each time you launch a gtk3 based GUI programm, dbus processes will spawn.
That's interesting. I've never seen any of these. How would it spawn processes the superuser cannot see?
Now, assuming that this is just not possible, and therefore the thing is not running any processes here, and still everything works, with some logical thinking I might conclude: it is not really necessary.

Furthermore, if some entities would want to start talking to each other, this is not only a security concern, it also most often means they are trying to develop some kind of AI, that is, try to know better what I want than I know what I want - resulting in the usual bad effects, that is, the system behaving in some way that was not explicitely configured and where we do not know why it does so.
 
I compiled Firefox without dbus, and it ran a whole lot faster than with dbus.

It's only purpose, as far as I can see, is keeping bloatware connected in run time, to do absolutely nothing.
Well, it's trendy...
I also learned, you do no longer configure your modelines for the screen. Instead, the monitor now talks to the application. All these things start talking to each other, without you taking notice. And they start to decide on things and do things without you considering. That's the point of it - because 1984 is quite a while back, and you are only supposed to unconditionally love Big Brother and know that others know what's best for you, or more specifically: do not think.
 
In my /etc/make.conf I have:
Code:
OPTIONS_UNSET= DBUS
When I compile programs, it gets rid of it, unless it's hard set without options. However, when I use packages, I get stuck with dbus.

Seriously, I don't understand why people keep introducing bloat into programs, usually upstream. Like they have a cluttered state of mind.
 
I see it is called a Linuxism by those here but is still a staple of any bsd desktop.
We have very few BSD specific desktops and because we share the general FOSS ones dbus just gets dragged in by a number of their "development ideas".

I personally prefer X11 handling communication between programs for GUI and UNIX sockets for CLI. If someone is using a crippled display system like some of these permanently half-complete Wayland compositors are, then perhaps dbus is useful to make up for other lacking systems.

Luckily almost nothing using dbus works properly anyway (mounting, shutdown, network, notifications) so you can generally leave it off. Some of our ports are patched so that they handle dbus not running correctly or they fake it running.

Long story short, it is basically old fashioned clutter like ToolTalk. There are always better ways.
 
Never see a application launching dbus itself, but like many users says here ,there are applications that need it
for example, lilyterm writen in gkt2 and is not way to get out dbus in that application
 
In my /etc/make.conf I have:
Code:
OPTIONS_UNSET= DBUS
I just spent some time figuring out why I was still getting DBUS even though I have that in my make.conf. The culprit turned out to be audio/volumeicon, which depends on x11-toolkits/gtk30, which will drag in accessibility/at-spi2-atk. The solution might be to add OPTIONS_UNSET=ATK_BRIDGE to make.conf. I'll try that and report back.

I thought of a daemon that requires Dbus: Avahi. This is why I use MDNSresponder instead. I still can't think of a command line utility that needs it.
 
I just spent some time figuring out why I was still getting DBUS even though I have that in my make.conf. The culprit turned out to be audio/volumeicon, which depends on x11-toolkits/gtk30, which will drag in accessibility/at-spi2-atk.
Yes, that's one of them. The other is qt5. I didn't find an easy way to get rid of it there.

I thought of a daemon that requires Dbus: Avahi.
Uh? That goes somewhere into the rendezvous/bonjour stuff, doesn't it?
 
Years ago on my Gentoo desktop I turned off dbus and did a rebuild, could not tell any difference for a few days... until I tried opening like 20 images in gimp (which is a common thing for me to do back then) from the file manager and got 20 instances of gimp - needless to say I reversed my decision and ended up doing another rebuild 😄
 
and got 20 instances of gimp
Heh, in many ways I am the opposite. I went to process a number of images by avoiding opening a wildcard * in gimp and instead creating a for each loop in a shell script to run gimp on each image, expecting it to block, I crop the image, save and close and the next one appears. Didn't quite work like that, it never blocked, instead opened up 3(?) instances and then opened up the remaining images in the first instance. Can't win!
 
It is a good thing I hate gnome 3 and programs that force gtk3 on me, and now I see my annoyance and hatred of d-bus is now justified.

I want it gone. But too bad, I just moved my desktop to openbsd since the freebsd installer doesn't want to work on my new laptop.

Maybe I wil linstall freebsd on a surrogate disk and stick it in my laptop

even more off topic, i dont get these multi quotes, they dont put anything in my reply/post box so i ant see where the quote is going to go
 
Is there some flag I can set to get programs to build with gtk2 instead in my make.conf? fuck gtk3, honestly.


Yes, that's one of them. The other is qt5. I didn't find an easy way to get rid of it there.


Uh? That goes somewhere into the rendezvous/bonjour stuff, doesn't it?
Another service I want gone from mysystem anyways.

[Mod: Watch your language]
 
Is there some flag I can set to get programs to build with gtk2 instead in my make.conf?
The other is qt5. I didn't find an easy way to get rid of it there.
Another service I want gone from my system anyways.
Maybe,
Code:
OPTIONS_UNSET+= GTK3 QT5
OPTIONS_SET+= GTK2
It may not get rid of it entirely. The plus is to use that option, if it doesn't force that option to break. The SET part can possibly be without a +. UNSET likely needs a +.
 
Back
Top